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

Allow to skip header autogeneration #379

Closed
asvetlov opened this issue May 28, 2015 · 8 comments
Closed

Allow to skip header autogeneration #379

asvetlov opened this issue May 28, 2015 · 8 comments
Labels

Comments

@asvetlov
Copy link
Member

I guess to skip generation of headers like CONTENT-TYPE etc. if headers['CONTENT-TYPE'] = None.

It may be implemented on both client and server sides.

@jettify
Copy link
Member

jettify commented May 28, 2015

+1 for this, I've encountered this issue porting library from requests to aiohttp.

In my case CONTENT-TYPE is used for request signing, and for some REST api, it is useful not add this header at all. From other side tornado does not include this header by default too.

@fafhrd91
Copy link
Member

+1 for skip, -1 for headers['CONTENT-TYPE'] = None

@asvetlov
Copy link
Member Author

@fafhrd91 would you propose another schema for skipping headers?

@fafhrd91
Copy link
Member

just keyword argument

@mpaolini
Copy link
Contributor

why not reusing the skip_auto_headers kwarg? like

aiohttp.client.get(skip_auto_headers=['Content-type'])

mpaolini pushed a commit to elastic-coders/aiohttp that referenced this issue Sep 14, 2015
Content-Type header automatic generation did not honor
the documented `skip_auto_headers` param.

With this patch we correctly skip generation of this header
while documenting that it is not possible to do so for the
`Content-Length` header.

See Issue aio-libs#379 for details.
@mpaolini
Copy link
Contributor

This one got fixed by pull request #507 IMO

@asvetlov
Copy link
Member Author

Sure, thanks

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants