From 6e848b3203b16fe858b0d32a3fe330cc45cd19ed Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Tue, 14 May 2013 12:14:08 +0200 Subject: [PATCH] cleanup --- httpie/sessions.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/httpie/sessions.py b/httpie/sessions.py index 965af496..ead383a5 100644 --- a/httpie/sessions.py +++ b/httpie/sessions.py @@ -46,12 +46,8 @@ def get_response(session_name, requests_kwargs, config_dir, read_only=False): session = Session(path) session.load() - # Merge request and session headers to get final headers for this request. request_headers = requests_kwargs.get('headers', {}) - merged_headers = session.headers.copy() - merged_headers.update(request_headers) - requests_kwargs['headers'] = merged_headers - # Update session headers with the request headers. + requests_kwargs['headers'] = dict(session.headers, **request_headers) session.update_headers(request_headers) auth = requests_kwargs.get('auth', None)