Index: trunk/extensions/SwiftMedia/wmf/rewrite.py |
— | — | @@ -175,8 +175,13 @@ |
176 | 176 | |
177 | 177 | |
178 | 178 | resp = webob.Response(app_iter=upcopy, content_type=c_t) |
179 | | - resp.headers.add('Content-Length', uinfo.getheader('Content-Length')) |
180 | | - resp.headers.add('Last-Modified', uinfo.getheader('Last-Modified')) |
| 179 | + try: |
| 180 | + resp.headers.add('Content-Length', uinfo.getheader('Content-Length')) |
| 181 | + resp.headers.add('Last-Modified', uinfo.getheader('Last-Modified')) |
| 182 | + resp.headers.add('Accept-Ranges', uinfo.getheader('Accept-Ranges')) |
| 183 | + except: |
| 184 | + # grab the headers if we can, no biggy if we can't. |
| 185 | + pass |
181 | 186 | return resp |
182 | 187 | |
183 | 188 | def __call__(self, env, start_response): |