From 572ed13aba403bae3a8d5ac8616728983cd238e8 Mon Sep 17 00:00:00 2001 From: Susanne Oberhauser Date: Wed, 20 Aug 2008 14:18:06 +0000 Subject: [PATCH] Actually use the new http_headers now available in the config. --- osc/core.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osc/core.py b/osc/core.py index c5e05e30..44f65a23 100755 --- a/osc/core.py +++ b/osc/core.py @@ -1433,9 +1433,10 @@ def http_request(method, url, headers={}, data=None, file=None): req = urllib2.Request(url) - #TODO: - #for header, value in [conf.config['api_host_options']['']['http_headers'].split]: - # req.add_header(header, value) + api_host_options=conf.get_apiurl_api_host_options(url) + + for header, value in api_host_options['http_headers']: + req.add_header(header, value) req.get_method = lambda: method