Open Bug 1948270 Opened 1 year ago Updated 4 months ago

Service worker respondWith uses HTTP/1.1

Categories

(Core :: DOM: Service Workers, defect)

Firefox 135
defect

Tracking

()

UNCONFIRMED

People

(Reporter: pinconquentin, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file Reproduction

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

Steps to reproduce:

Register a service worker, intercepting all fetch events, and use event.respondWith(fetch(event.request)) from the service worker 'fetch' listener to actually perform the request.

Actual results:

If the queries server supports HTTP/2 or 3, it should use this protocol. Instead, in the network tab, the query is marked as made using HTTP/1.1

Expected results:

The same HTTP protocol should be used with or without using respondWith

Attached file about:support.json

Content of about:support

Comment on attachment 9466182 [details]
Reproduction

Reproduction

Attachment #9466182 - Attachment description: sw-http1.zip → Reproduction

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core

I think the implementation belongs in mozilla::dom::ServiceWorkerManager::DispatchFetchEvent, but I'm not 100% sure.
Olli, if you think this is a but in Necko, please move it back. I'd appreciate a brief outline of how service worker fetches are piped back into intercepted HTTP channel.

Flags: needinfo?(smaug)
Flags: needinfo?(smaug) → needinfo?(bugmail)

Moving into Service worker component based on Valentin's comment.

Component: Networking → DOM: Service Workers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: