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

Sending empty header filed #362

Closed
ghost opened this issue Sep 4, 2018 · 5 comments
Closed

Sending empty header filed #362

ghost opened this issue Sep 4, 2018 · 5 comments
Labels

Comments

@ghost
Copy link

ghost commented Sep 4, 2018

Sometimes there is a real need to send header filed with empty value. Example here explains how to do that.

@lorien
Copy link
Owner

lorien commented Sep 16, 2018

I was not aware that passing empty string as header value forces header to be removed from request. That does not look correct. I mean that current Grab behavior does not look correct. So that is really have to be done is to change Grab so it does not delete header if its value is empty string.
I do not think that any user of Grab uses empty string to remove headers from request.

Also, same behavior should be implemented for urllib3 transport (or should be done nothing if it is already work in correct way in urllib3).

@ghost
Copy link
Author

ghost commented Sep 19, 2018

I bet i saw this in the official documentation when i just started using grab long ago. And i was pretty sure that everyone else who uses grab makes use of that as a regular way to unset particular header(s).

@lorien
Copy link
Owner

lorien commented Sep 21, 2018

At least author of Grab does not use empty headers in this way and even does not know that it works like this. So, nope, not everyone.

@lorien
Copy link
Owner

lorien commented Sep 21, 2018

According to this https://tools.ietf.org/html/rfc7230#section-3.2 empty value is allowed

field-value = *( field-content / obs-fold )

@lorien lorien added bug and removed enhancement labels Feb 25, 2022
@lorien
Copy link
Owner

lorien commented Dec 8, 2022

I am closing this issue, because there is no pycurl backend in Grab anymore. And I guess no more users :D

@lorien lorien closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant