[socket-proc] Enable ContentSniffer for socket process

RESOLVED FIXED

Status

()

enhancement
P3
normal
RESOLVED FIXED
10 months ago
3 months ago

People

(Reporter: mayhemer, Assigned: junior)

Tracking

(Blocks 2 bugs)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 affected)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 attachment)

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: 3 months 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.