Open Bug 1702848 Opened 5 years ago Updated 1 year ago

On Edit and resend, Updating the body of the multipart request does not correctly update the Content-Length header

Categories

(DevTools :: Netmonitor, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: vladimir.golovin00, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

578.23 KB, video/webm
Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Steps to reproduce:

If you submit a multipart form and click Edit and resend in the developer tools, and you add one character to the value of one input, you will see that the auto-calculated content-length will get reduced instead of increased.

This is because when we edit the data, firefox replaces all CRLF with LF, thus reducing the content-length

Tested on ESR and nightly on debian and ubuntu

Actual results:

Content-length changes as all CRLF are changed to LF, breaking RFC 7578 of multipart forms and making it impossible to replay them on specific apps (as they differ)

Expected results:

Firefox doesn't replace CRLF to LF for multipart forms

Setting a component for this issue in order to get the dev team involved.
If you feel it's an incorrect one please feel free to change it to a more appropriate one.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Can you please create a screencast of the issue? How-to is here [1].
Thanks.
[1] https://help.gnome.org/users/gnome-help/stable/screen-shot-record.html

Flags: needinfo?(vladimir.golovin00)
Attached video ff.webm

sorry for the delay here's how i reproduce with a very basic multipart form and a textarea, editing the textarea value reduces the content length (CLRF converted to LF)

Flags: needinfo?(vladimir.golovin00)

Is this still an issue ?

Flags: needinfo?(vladimir.golovin00)
Component: Widget: Gtk → Netmonitor
Product: Core → DevTools
Version: 78 Branch → unspecified

Redirect a needinfo that is pending on an inactive user to the triage owner.
:Honza, since the bug has recent activity, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(vladimir.golovin00) → needinfo?(odvarko)

Bomsy, can you reproduce this issue?

Flags: needinfo?(odvarko) → needinfo?(hmanilla)

I can reproduce the issue. Though the STR here tests on the old edit and resend panel. I tested with the new version (devtools.netmonitor.features.newEditAndResend set to true) anf the issue still exists.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(hmanilla)
Priority: -- → P3
Summary: Edit and resend makes it impossible to replay perfectly a multipart request → On Edit and resend, Updating the body of the multipart request does not correctly update the Content-Length header
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: