git.samba.org
/
jelmer
/
calypso.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ae1a58
)
Allow If-Match parameter to not have " marks
author
Keith Packard
<keithp@keithp.com>
Wed, 11 Jan 2012 07:45:02 +0000
(23:45 -0800)
committer
Keith Packard
<keithp@keithp.com>
Wed, 11 Jan 2012 07:45:02 +0000
(23:45 -0800)
They're not required, so match either way.
Signed-off-by: Keith Packard <keithp@keithp.com>
calypso/__init__.py
patch
|
blob
|
history
diff --git
a/calypso/__init__.py
b/calypso/__init__.py
index e7b5cb0cf480ddb607c900d229ce1e9678744df6..db681753663e4877b359941920c59c127c38231e 100644
(file)
--- a/
calypso/__init__.py
+++ b/
calypso/__init__.py
@@
-250,8
+250,12
@@
class CollectionHTTPHandler(server.BaseHTTPRequestHandler):
self.end_headers()
def if_match(self, item):
- etag = '"' + item.etag + '"'
- return self.headers.get("If-Match", etag) == etag
+ header = self.headers.get("If-Match", item.etag)
+ if header == item.etag:
+ return True
+ if header == '"' + item.etag + '"':
+ return True
+ return False
@check_rights
def do_DELETE(self):