Resending form post data is broken if a service worker is registered

NEW
Unassigned

Status

()

defect
P2
normal
2 years ago
4 months ago

People

(Reporter: catalinb, Unassigned)

Tracking

(Blocks 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
When resubmitting form requests (refresh + resend dialog), if a service worker is registered, intercepts the request, but then resets the channel (fetch handler that doesn't call .respondWith) - firefox will not send the correct Content-Length and Content-Type headers.

This happens because we reuse a nsStorageInputStream stored in history that doesn't contain these headers.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1333182#c10 and bug 1337033.

We should use a different input stream that preserves the header information from nsMIMEInputStream and write a test that covers resending post data.
Priority: -- → P2
(Reporter)

Updated

2 years ago
See Also: → 1333182

Comment 1

a year ago
Hello guys.
Thank you for great software.

I'm suffuring from this 1-year-old bug these days (with my CMS).

I made a page to reproduce this bug:
https://nebosuker.net/ff59-form-repost/

I'm very happy if Firefox dev team fix this bug...

Thanks.
Thanks for the test case.  I'll try to take a look.
Flags: needinfo?(catalin.badea392)

Comment 3

a year ago
Thank you Ben!
I'm very happy to hear that!
(Reporter)

Comment 4

a year ago
(In reply to Ben Kelly [Part-time, not reviewing][:bkelly] from comment #2)
> Thanks for the test case.  I'll try to take a look.

why the needinfo? :) Is there anything I can do to help?
Flags: needinfo?(catalin.badea392)
Sorry, I meant to NI myself, but must have hit reporter by accident.
Flags: needinfo?(bkelly)
Sorry, I never found time to investigate this.
Flags: needinfo?(bkelly)

Comment 7

4 months ago
Wow, is this bug already fixed?

I tested on https://nebosuker.net/ff59-form-repost/ and it seems to work fine!

Thank you dev team!
You need to log in before you can comment on or make changes to this bug.