Browse code

merge relistan/master

Matt Domsch authored on 2012/07/14 23:05:59
Showing 1 changed files
... ...
@@ -88,6 +88,7 @@ class Config(object):
88 88
     website_endpoint = "http://%(bucket)s.s3-website-%(location)s.amazonaws.com/"
89 89
     additional_destinations = []
90 90
     cache_file = ""
91
+    add_headers = ""
91 92
 
92 93
     ## Creating a singleton
93 94
     def __new__(self, configfile = None):
... ...
@@ -117,6 +118,12 @@ class Config(object):
117 117
         cp = ConfigParser(configfile)
118 118
         for option in self.option_list():
119 119
             self.update_option(option, cp.get(option))
120
+
121
+        if cp.get('add_headers'):
122
+            for option in cp.get('add_headers').split(","):
123
+                (key, value) = option.split(':')
124
+                self.extra_headers[key.replace('_', '-').strip()] = value.strip()
125
+
120 126
         self._parsed_files.append(configfile)
121 127
 
122 128
     def dump_config(self, stream):