Show More
@@ -399,6 +399,12 b' class hgweb(object):' | |||
|
399 | 399 | tag = 'W/"%d"' % self.mtime |
|
400 | 400 | if req.headers.get('If-None-Match') == tag: |
|
401 | 401 | res.status = '304 Not Modified' |
|
402 | # Content-Type may be defined globally. It isn't valid on a | |
|
403 | # 304, so discard it. | |
|
404 | try: | |
|
405 | del res.headers[b'Content-Type'] | |
|
406 | except KeyError: | |
|
407 | pass | |
|
402 | 408 | # Response body not allowed on 304. |
|
403 | 409 | res.setbodybytes('') |
|
404 | 410 | return res.sendresponse() |
General Comments 0
You need to be logged in to leave comments.
Login now