Open Bug 1857847 Opened 7 months ago Updated 7 months ago

Expose XPCOM helper to use ChallengeParser from privileged JS

Categories

(Core :: Networking: HTTP, task, P2)

task

Tracking

()

People

(Reporter: jdescottes, Assigned: valentin)

References

Details

(Whiteboard: [necko-triaged])

(In reply to Valentin Gosu [:valentin] (he/him) from Bug 1855149 comment #6)

(In reply to Julian Descottes [:jdescottes] from comment #1)

Hi Valentin,

I was looking at the parsing of challenges headers (WWW-Authenticate/Proxy-Authenticate). It's not completely trivial, because we can get multiple challenges, separated by a comma, but we can also have commas inside a challenge.

I think this is handled on the platform side at https://searchfox.org/mozilla-central/source/netwerk/protocol/http/nsHttpChannelAuthProvider.cpp#482 and I was wondering if we should try to expose this to JS somehow or if I should duplicate it?

Up to you. I can add an XPCOM helper method to extract the challenges if you think that would be helpful.

It would be helpful to reuse the logic from nsHttpChannelAuthProvider instead of duplicating it on the JS side.

Component: WebDriver BiDi → Networking: HTTP
Product: Remote Protocol → Core
Assignee: nobody → valentin.gosu
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
You need to log in before you can comment on or make changes to this bug.