Permalink
Browse files

web: stupid chrome: you should send "Content-Type" and not "Content-t…

…ype"
  • Loading branch information...
1 parent bde1979 commit 9a8801aa222a7c75177d42265df20cc6b74fad63 @billiob billiob committed Jul 27, 2010
Showing with 3 additions and 3 deletions.
  1. +2 −2 amsn2/ui/front_ends/web/bend.py
  2. +1 −1 amsn2/ui/front_ends/web/tinyhttpserver.py
@@ -116,8 +116,8 @@ def post_signin(self, w, uri, headers, body = None):
if self.login_window is None:
w._400()
return
- if (body and 'Content-Type' in headers
- and headers['Content-Type'].startswith('application/x-www-form-urlencoded')):
+ if (body and 'content-type' in headers
+ and headers['content-type'].startswith('application/x-www-form-urlencoded')):
args = cgi.parse_qs(body)
print "<<< signin: %s" %(args,)
self.login_window.signin(args['username'][0], args['password'][0])
@@ -65,8 +65,8 @@ def on_headers(self, headers):
for line in headers[eol:].splitlines():
if line:
name, value = line.split(":", 1)
- self._headers[name] = value.strip()
#print "method=%s, uri=%s, version=%s" % (self._method, uri, self._version)
+ self._headers[name.lower()] = value.strip()
if not self._version.startswith("HTTP/"):
self.close()
return

0 comments on commit 9a8801a

Please sign in to comment.