content-length should be ignored for request/response
I haven't actually tried this but I suspect Miniflare doesn't handle content-length correctly. When using a custom Request/Response body (e.g. TransformStream), the EW runtime strips this header. Only FixedLengthStream can accomplish this for transform streams (similarly I think custom ReadableStream won't work either).
Hey! 👋 Thanks for raising this. https://github.com/cloudflare/miniflare/commit/c010addbd2ff6c87dd45c8e93de8f81aae94833a was added in 2.1.0, but this will still use the Content-Length header if one's defined.
Hey! 👋 This should be fixed in Miniflare 3, which uses the same workerd runtime as production, so shouldn't have these behaviour mismatches. I'm going to close this as it's unlikely we'll have time to fix this in Miniflare 2. Our development effort is primarily focused on version 3.