-
-
Notifications
You must be signed in to change notification settings - Fork 489
Headers parsing during Request creation #409
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
Comments
Doing I suggest to remove this ability to read HTTP headers from |
I tag this one "bug" because a HTTP Header must not override the payload attribute. e.g. |
I'm not sure I agree with your conclusion. 2 reasons:
|
For 1. each For 2. The only case where I see OAuth data passing through HTTP Headers is OAuth1 via Does it make sense ? |
I agree we should prevent headers and body/query params overwriting each other. Re 2. All headers would still be accessible to the validator functions via the |
Ok, makes sense. |
Hi,
I am not sure that what I'm seeing is a bug or the intended behaviour. In
common.py
,class Request
, line 380:self.headers = CaseInsensitiveDict(encode(headers or {}))
The headers are parsed into a
CaseInsensitiveDict
, which meansself.headers['content-type']
,self.headers['Content-Type']
andself.headers['cONteNt-tYpE']
will all return the same value BUT the keys of the dictionary are still the ones with which the items were defined.Line 386, all the
_params
are set to None, with full lower case keys.Then line 406
self._params.update(self.headers)
So if some
_params
were set in the headers they should update the values here. Problem is, the headers all have first-letter capitalization. So passing a token through header will lead to haveIs this the intended behaviour ? I guess not.
The text was updated successfully, but these errors were encountered: