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

Remove all headers from response when multiple headers are received #6

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

hugochinchilla
Copy link

When a request is completed following a redirect, the curl response contains the headers from the first and the second requests. In this case not all the headers are removed, only the last one is stripped from the response, resulting in a body containing the other headers.

HTTP/1.1 302 Found
Location: http://www.google.es/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Date: Tue, 20 Dec 2011 10:54:50 GMT
Server: gws
Content-Length: 218
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN

HTTP/1.1 200 OK
Date: Tue, 20 Dec 2011 10:54:50 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Transfer-Encoding: chunked

@nickl-
Copy link

nickl- commented Jun 19, 2012

merged at nickl-/curl@8dec78d

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.

5 participants