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

suppress any default headers when sent with no value #476

Closed
dogeared opened this issue Jun 3, 2016 · 1 comment
Closed

suppress any default headers when sent with no value #476

dogeared opened this issue Jun 3, 2016 · 1 comment
Labels
enhancement New feature or enhancement planned Solution is being worked on

Comments

@dogeared
Copy link

dogeared commented Jun 3, 2016

http localhost:8080 Accept:

Should make a request that does not have an Accept header at all.

Curl currently behaves this way:

➥ curl -v -H 'Accept:' localhost:8080/
*   Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.43.0
>

vs.

➥ curl -v localhost:8080/
*   Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.43.0
> Accept: */*
>
@ffernand
Copy link

ffernand commented Jun 17, 2016

👍 for this!

Currently, I have to keep the session file open and manually delete the header if I need a specific header removed for the next request in the session.

ADDENDUM: If the worry is that it'll remove Httpies' ability to send empty headers, Curl allows a header to be terminated with a semi-colon in order to send out an empty header (ie. -H 'X-CUSTOM-HEADER;')

@jkbrzt jkbrzt added enhancement New feature or enhancement planned Solution is being worked on labels Jul 1, 2016
@jkbrzt jkbrzt closed this as completed in 5acbc90 Jul 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement planned Solution is being worked on
Projects
None yet
Development

No branches or pull requests

3 participants