ob-http icon indicating copy to clipboard operation
ob-http copied to clipboard

Fix header body splitting when doing https request through proxy

Open cww0614 opened this issue 6 years ago • 0 comments

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.

cww0614 avatar May 31 '19 04:05 cww0614