Reset Content-Length Header when editing and resending Requests

In the Network tab, when you edit and resend a POST or PUT request, if you modify the length of the request body, the Content-Length header value will still reflect the original unmodified body length. You can remove the Content-Length header before resending the request and it gets autotmagically replaced with the correct content-length upon sending.
However if you don’t remove the content-length header or change its value to the new body length before sending, the request just hangs. This can be super frustrating when you forget to delete the content-length header after manually crafting a large request and having to do it again.
It would be awesome if the content-length value was automatically removed or updated to the body length without having to remove it or modify it manually.

I agree, this is annoying and should be solved. I filed to track it and discuss further on which route we should take to make this work.

Thank you :slight_smile:

Just for posterity, this landed in Firefox 77 thanks to a contribution from ojaswa1942.

Looks like the problem described here is back.
Now the value of the Content-Length header not only remains unchanged, but now it also cannot be deleted at all, since there is no possibility to delete the Content-Length header on the new UI

The only ability to influence on Content-Length header that I have found is to re-declare it as additional header manually

Which in my opinion is even more inconvenient and annoying than the problem described here two years ago :upside_down_face:

This issue has been partially mentioned as part of another issue discussed in File form payload corruption (byte 0xD) when resending a request in the network tab

However, I think it is appropriate to consider this as a separate problem, who knows, it may be easier to fix it and take less time :upside_down_face: