Closed Bug 1497245 Opened 6 years ago Closed 5 years ago

[socket-proc] Enable ContentSniffer for socket process

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
Tracking Status
firefox64 --- affected

People

(Reporter: mayhemer, Assigned: CuveeHsu)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Whiteboard: [necko-triaged]

The sniffer takes up to 1445 bytes which is the nsMediaSniffer

Spec: https://mimesniff.spec.whatwg.org/#reading-the-resource-header

We can pass the sniffed data, but 1MB is something.
If possible, I'd like to put the sniffing to socket process

Assignee: nobody → juhsu
Status: NEW → ASSIGNED

Since we tend to not expose the PeekStream API to nsAHttpTransactionShell

Summary: [socket-proc] Enable PeekStream on HttpTransactionParent (nsAHttpTransactionShell) → [socket-proc] Enable ContentSniffer for socket process

I just figure out we have sniffer written in JS which doesn't allow in socket process (we don't have js engine running in socket process). Therefore, we need to do the sniffer in the chrome process. We need to pass LOAD_CALL_CONTENT_SNIFFERS to socket process. transaction child will pass at most 1445 bytes during OnStartRequest

If the performance has big effect, we need to limited those sniffers to be written in cpp only.

needinfo for review request

Flags: needinfo?(dd.mozilla)
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: needinfo?(dd.mozilla)
Resolution: --- → FIXED
Blocks: 1547876
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: