Worker is counting 1 fetch (with no redirects) as 2 subrequests

Hello all! I am currently blocked and puzzled by CF Worker's subrequest counting behavior. I have a worker that makes a GET request to a hal+json API, and it appears to be counting every 1 fetch as 2.
I know this because I wrote a test route that fetches until it throws the "too many subrequests" error, it stops at the 26th instead of the 51st. When I set the URL to get from another API, it can do 50 requests like normal, so it seems to be something about this specific API. My main question is: are there any cases other than redirects that would cause a Worker to count 1 fetch request as 2 subrequests? Here are some possibly relevant headers from the response:
REQUEST #25; code:200; response.redirected:false;
Content-Type:application/hal+json;
cf-cache-status:DYNAMIC;
cache-control:max-age=0, private, must-revalidate;
connection:keep-alive;
via:1.1 varnish, 1.1 varnish, 1.1 varnish;
transfer-encoding:chunked
REQUEST #25; code:200; response.redirected:false;
Content-Type:application/hal+json;
cf-cache-status:DYNAMIC;
cache-control:max-age=0, private, must-revalidate;
connection:keep-alive;
via:1.1 varnish, 1.1 varnish, 1.1 varnish;
transfer-encoding:chunked
I made a community post with more detail and the test code. https://community.cloudflare.com/t/worker-is-counting-1-fetch-with-no-redirects-as-2-subrequests/840794 Any help would be greatly appreciated
1 Reply
nevr0s
nevr0sOP2mo ago
Bump! Does anyone know where I can get more help with this?

Did you find this page helpful?