diff --git a/amsn2/ui/front_ends/web/bend.py b/amsn2/ui/front_ends/web/bend.py index e7f861f8..a3924d42 100644 --- a/amsn2/ui/front_ends/web/bend.py +++ b/amsn2/ui/front_ends/web/bend.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]) diff --git a/amsn2/ui/front_ends/web/tinyhttpserver.py b/amsn2/ui/front_ends/web/tinyhttpserver.py index 25de1b63..fc355cd6 100644 --- a/amsn2/ui/front_ends/web/tinyhttpserver.py +++ b/amsn2/ui/front_ends/web/tinyhttpserver.py @@ -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