ob-http
ob-http copied to clipboard
Fix header body splitting when doing https request through proxy
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.