Bug 264309 - HTTP Connect proxy authorization header is not sent when using proxyConfigurations API
Summary: HTTP Connect proxy authorization header is not sent when using proxyConfigura...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-06 17:58 PST by Ali Juma
Modified: 2024-03-08 15:44 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2023-11-06 17:58:40 PST
An HTTP Connect proxy configuration on which an nw_proxy_config_set_username_and_password call has been made, does not send the Proxy-Authorization header to the proxy server (not initially, and also not after getting a 407 Proxy Authentication Required response).

Specifically, creating the proxy using:
  nw_endpoint_t endpoint = nw_endpoint_create_host("localhost", "8080");
  nw_proxy_config_t proxyConfig = nw_proxy_config_create_http_connect(endpoint, nil);
  nw_proxy_config_set_username_and_password(proxyConfig, "alice", "superSecret");

and then setting it on WKWebsiteDataStore, I do get CONNECT requests to the proxy server, but the Proxy-Authorization header is never sent, not even after the server responds with 407 (Proxy Authentication Required).

I've also filed FB13343450 with a sample app.
Comment 1 Alexey Proskuryakov 2023-11-07 10:05:14 PST
rdar://118028838
Comment 2 Alexey Proskuryakov 2024-03-08 15:44:14 PST
This ended up being tracked as an issue below WebKit. Please continue communicating about this via Feedback Assistant.