diff --git a/httpie/sessions.py b/httpie/sessions.py index 938c45c8..fe1e6bfe 100644 --- a/httpie/sessions.py +++ b/httpie/sessions.py @@ -37,7 +37,6 @@ def get_response(name, request_kwargs, config_dir, read_only=False): session = Session(host, name) session.load() - # Update session headers with the request headers. session['headers'].update(request_kwargs.get('headers', {})) # Use the merged headers for the request diff --git a/tests/tests.py b/tests/tests.py index a8e6cc04..4511812e 100755 --- a/tests/tests.py +++ b/tests/tests.py @@ -1403,6 +1403,9 @@ class SessionTest(BaseTestCase): ) self.assertIn(OK, r3) + # Origin can differ on Travis. + del r1.json['headers']['origin'], r2.json['headers']['origin'] + # Should be the same as before r2. self.assertDictEqual(r1.json, r3.json)