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

Fix header body splitting when doing https request through proxy #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cww0614
Copy link

@cww0614 cww0614 commented May 31, 2019

When doing https request through a http proxy in curl, the response will be like this: (executing curl -i https://httpbin.org/ip)

HTTP/1.1 200 Connection Established

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: application/json
Date: Fri, 31 May 2019 04:03:27 GMT
Referrer-Policy: no-referrer-when-downgrade
Server: nginx
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Content-Length: 49
Connection: keep-alive

{
  "origin": "xxx.xxx.xxx.xxx"
}

This response is just like that when redirection is involved. Therefore the redirection-handling part is modified slightly to fix the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant