requests icon indicating copy to clipboard operation
requests copied to clipboard

Need a requests version number which OrderedDict is working on headers

Open alwaysnotworkingforme opened this issue 7 years ago • 2 comments

OrderedDict not working on headers again on version: 2.18.4 and 2.21.0

OrderedDict still works fine on data in this version, but not working on headers again.

I know this won't be fixed for a long time.

So I need help with a version number which OrderedDict is working on headers.

alwaysnotworkingforme avatar Mar 06 '19 15:03 alwaysnotworkingforme

My code: headers01 = OrderedDict([("Connection", "close"), ("Upgrade-Insecure-Requests", "1"), ("User-Agent", "SomeAgent"), ("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8"), ("Accept-Encoding", "gzip, deflate"), ("Accept-Language", "Some Language")])

result: Connection: close Accept-Encoding: gzip, deflate Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8 User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2) Accept-Language: en-US,en;q=0.5 Upgrade-Insecure-Requests: 1

alwaysnotworkingforme avatar Mar 06 '19 15:03 alwaysnotworkingforme

There is a test for this in the test suite.

https://github.com/kennethreitz/requests/blob/a345b776fb2cf67d1a1810349e71fd60a83f53eb/tests/test_requests.py#L446

What happens if you run the tests on your machine?

ghost avatar Mar 14 '19 14:03 ghost