FetchEvent not received until POST request finishes?
While uploading a 100mb file to a worker via POST and PUT requests, I noticed I didn’t receive fetch events until seconds later. In my worker I check the content-length header, and if it’s too big I call cancel on the request readable stream and return an HTTP 413 error.
Why isn’t the fetch request handler being called immediately? For this example, I expected to be able to immediately cancel the post request after receiving the content-length header with the large size. Is this not possible?
Thank you!
0 Replies