[socket-proc] Enable ContentSniffer for socket process

ASSIGNED
Assigned to

Status

()

enhancement
P3
normal
ASSIGNED
7 months ago
12 days ago

People

(Reporter: mayhemer, Assigned: junior)

Tracking

(Blocks 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(firefox64 affected)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 attachment)

(Assignee)

Updated

7 months ago
Whiteboard: [necko-triaged]
(Assignee)

Comment 1

3 months ago

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)

Updated

3 months ago
Assignee: nobody → juhsu
Status: NEW → ASSIGNED
(Assignee)

Comment 2

3 months ago

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
(Assignee)

Comment 4

25 days ago

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.

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