Skip to content
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

IPv6 + HTTP proxy is missing [ on HTTPS URLs #2344

Closed
swankjesse opened this issue Feb 15, 2016 · 0 comments
Closed

IPv6 + HTTP proxy is missing [ on HTTPS URLs #2344

swankjesse opened this issue Feb 15, 2016 · 0 comments
Labels
bug Bug in existing code
Milestone

Comments

@swankjesse
Copy link
Member

Both curl and Firefox include [ and ] in the request line and host header when using IPv6 with an HTTP proxy. OkHttp doesn’t and this is broken.

CONNECT [::1]:443 HTTP/1.1
Host: [::1]:443
User-Agent: curl/7.43.0
Proxy-Connection: Keep-Alive
GET http://[::1]/foo HTTP/1.1
Host: [::1]
User-Agent: curl/7.43.0
Accept: */*
Proxy-Connection: Keep-Alive
CONNECT [::1]:443 HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0
Proxy-Connection: keep-alive
Connection: keep-alive
Host: [::1]:443
GET http://[::1]/foo HTTP/1.1
Host: [::1]
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
@swankjesse swankjesse added the bug Bug in existing code label Feb 21, 2016
@swankjesse swankjesse added this to the 3.2 milestone Feb 21, 2016
swankjesse added a commit that referenced this issue Feb 22, 2016
Previously we omitted the square braces and explicit port on CONNECT requests
and the square braces in the Host header.

Closes #2344
swankjesse added a commit that referenced this issue Feb 22, 2016
Previously we omitted the square braces and explicit port on CONNECT requests
and the square braces in the Host header.

Closes #2344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in existing code
Projects
None yet
Development

No branches or pull requests

1 participant