Index: trunk/extensions/SwiftMedia/wmf/rewrite.py |
— | — | @@ -166,14 +166,16 @@ |
167 | 167 | except TypeError: |
168 | 168 | last_modified = time.mktime(time.localtime()) |
169 | 169 | |
170 | | - if self.writethumb: |
| 170 | + if self.writethumb and reqorig.method != 'HEAD': |
171 | 171 | # Fetch from upload, write into the cluster, and return it |
172 | 172 | upcopy = Copy2(upcopy, self.app, url, |
173 | 173 | urllib2.quote(container), obj, self.authurl, self.login, |
174 | 174 | self.key, content_type=c_t, modified=last_modified, |
175 | 175 | content_length=content_length) |
176 | 176 | |
| 177 | + |
177 | 178 | resp = webob.Response(app_iter=upcopy, content_type=c_t) |
| 179 | + resp.headers.add('Content-Length', uinfo.getheader('Content-Length')) |
178 | 180 | resp.headers.add('Last-Modified', uinfo.getheader('Last-Modified')) |
179 | 181 | return resp |
180 | 182 | |