Open Bug 1341301 Opened 7 years ago Updated 2 years ago

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

Categories

(Core :: DOM: Service Workers, defect, P2)

defect

Tracking

()

People

(Reporter: catalinb, Unassigned)

References

(Blocks 1 open bug)

Details

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
See Also: → 1333182
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)
Thank you Ben!
I'm very happy to hear that!
(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)
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!
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.