-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URLs are not passed to shExpMatch #58
Comments
Interesting, this would definitely break PAC files which call shExpMatch with a glob starting with I agree that Alpaca should add a scheme if the URL does not already contain one - I guess this would happen in either findProxyForRequest() or FindProxyForURL(). Makes sense to go with https as the scheme in all cases, at least initially. But I do wonder whether there are any cases where CONNECT is used for non-TLS tunnels. |
Btw, in addition to adding a scheme, does Alpaca need to do anything with the port? E.g. if we get a request like I'm not sure what PAC scripts out in the wild expect, or what browsers like Chrome do... |
Also change FindProxyForURL() to pass by value rather than by reference. This function modifies its copy of the URL, so we'll make sure to do that on a copy rather than on the original. Fixes #58
Also change FindProxyForURL() to pass by value rather than by reference. This function modifies the URL, so do that on a copy rather than the original. Fixes #58
) Also change FindProxyForURL() to pass by value rather than by reference. This function modifies the URL, so do that on a copy rather than the original. Fixes #58
A
CONNECT
verb used when proxying usually contains just a hostname:port, not a full URL - i.e. it does not contain a scheme.However, certain code in alpaca expects this to be a URL - in particular, it is passed to
shExpMatch
as a URL but without the scheme, so any matches against a pattern with a scheme will fail. It seems that chrome does pass a URL here, from anecdotal evidence.I think we need to add the https scheme if it is missing. I'm not sure it makes sense for any scheme other than https to be used for the tunnel.
The text was updated successfully, but these errors were encountered: