Header not included when making a request via proxy #116

Closed
taylorleese opened this Issue Dec 20, 2012 · 1 comment

Comments

Projects
None yet
2 participants

I noticed the header is not included when making a request via proxy:

$ http --verbose GET localhost:9090/car "Accept: foo" --proxy=http:localhost:8001
GET /car HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, compress
Host: localhost:9090
Proxy-Connection: Keep-Alive
User-Agent: HTTPie/0.3.1

HTTP/1.1 400 Bad Request
Cache-Control: no-cache, no-store
Content-Encoding: gzip
Content-Length: 53
Content-Type: application/json charset=UTF-8
Date: Thu, 20 Dec 2012 22:09:42 GMT
Expires: 0
Pragma: no-cache

{"error":"Invalid request"}

When there is no proxy the header is included correctly:

$ http --verbose GET localhost:9090/car "Accept: foo"
GET /car HTTP/1.1
Accept:  foo
Accept-Encoding: gzip, deflate, compress
Host: localhost:9090
User-Agent: HTTPie/0.3.1

HTTP/1.1 400 Bad Request
Cache-Control: no-cache, no-store
Content-Encoding: gzip
Content-Length: 53
Content-Type: application/json charset=UTF-8
Date: Thu, 20 Dec 2012 22:11:17 GMT
Expires: 0
Pragma: no-cache

{"error":"Invalid request"}
Owner

jakubroztocil commented Dec 20, 2012

This seems to be the same as #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment