Closed Bug 1697292 Opened 3 years ago Closed 3 years ago

The request body parser needs to change to match DOM changes


(WebExtensions :: Request Handling, task, P2)



(firefox90 fixed)

90 Branch
Tracking Status
firefox90 --- fixed


(Reporter: andreu, Assigned: andreu)




(1 file)

Bug 1686765 is changing some details of form serialization, and in particular, it changes the way names and filenames are serialized in multipart/form-data payloads. As they are currently serialized, newlines are converted into spaces, and double quotes are escaped with a backslash. This is being changed to match Chrome's behavior, with newlines (CR and LF) and double quotes being percent-escaped.

This change breaks toolkit/components/extensions/test/mochitest/test_ext_webrequest_upload.html because the WebExtensions code that parses request bodies on webRequest.onBeforeRequest decodes quotes escaped with a backslash but lets percent escapes through. I checked Chrome's behavior here, and it decodes all percent-escapes, not only those produced by the serialization.

Andreu, is there a target release version for this change? Will you be able to update the handling in webRequest[1]?


Flags: needinfo?(abb)

There isn't a target release version, yet at the very least. I'll be fixing the handling in a separate commit in the same Phabricator revision, if that's okay.

Flags: needinfo?(abb)

This will also make the parser compatible with the changes to the multipart/form-data serializer in bug 1686765.

Assignee: nobody → abb
Severity: -- → N/A
Ever confirmed: true
Priority: -- → P2

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:abb, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(mixedpuppy)
Flags: needinfo?(abb)

The patch for this bug cannot be merged before the one for bug 1686765, which is still waiting for a review.

Flags: needinfo?(abb)
Pushed by
Update the WebExtensions' multipart/form-data parser to match Chrome. r=mixedpuppy
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Flags: needinfo?(mixedpuppy)
You need to log in before you can comment on or make changes to this bug.