1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Make default HTTP headers case-insensitive

Cloase #644
This commit is contained in:
Jakub Roztocil
2018-02-22 12:52:57 +01:00
parent 05547224ce
commit 0f4dce98c7
3 changed files with 22 additions and 4 deletions

View File

@@ -7,6 +7,21 @@ from utils import MockEnvironment, http, HTTP_OK
from fixtures import FILE_PATH
def test_default_headers_case_insensitive(httpbin):
"""
<https://github.com/jakubroztocil/httpie/issues/644>
"""
r = http(
'--debug',
'--print=H',
httpbin.url + '/post',
'CONTENT-TYPE:application/json-patch+json',
'a=b',
)
assert 'CONTENT-TYPE: application/json-patch+json' in r
assert 'Content-Type' not in r
class TestImplicitHTTPMethod:
def test_implicit_GET(self, httpbin):
r = http(httpbin.url + '/get')