def test_session_ignored_header_prefixes(self, httpbin): self.start_session(httpbin) r1 = http('--session=test', 'GET', httpbin.url + '/get', 'Content-Type: text/plain', 'If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT', env=self.env()) assert HTTP_OK in r1 r2 = http('--session=test', 'GET', httpbin.url + '/get', env=self.env()) assert HTTP_OK in r2 assert no_content_type(r2.json['headers']) assert 'If-Unmodified-Since' not in r2.json['headers']
def test_GET_no_data_no_auto_headers(self, httpbin): # https://github.com/jkbrzt/httpie/issues/62 r = http('GET', httpbin.url + '/headers') assert HTTP_OK in r assert r.json['headers']['Accept'] == '*/*' assert no_content_type(r.json['headers'])