[Code] [PATCH 1/3] ensure that an HTTP response is sent in examples/consumer.py
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Apr 4 18:39:39 UTC 2013
Without this patch, when this codepath is executed, no HTTP response
or content-type is sent upon form submission in the python example
consumer.
on firefox 20 (i haven't tested other versions) the lack of an HTTP
response causes my browser to treat the provided content as
text/plain, which means that the form doesn't get auto-submitted, so
authentication fails.
With the patch, OpenID authentication proceeds as expected.
---
examples/consumer.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 examples/consumer.py
diff --git a/examples/consumer.py b/examples/consumer.py
old mode 100644
new mode 100755
index 1c38a62..968cd42
--- a/examples/consumer.py
+++ b/examples/consumer.py
@@ -207,7 +207,7 @@ class OpenIDRequestHandler(BaseHTTPRequestHandler):
trust_root, return_to,
form_tag_attrs={'id':'openid_message'},
immediate=immediate)
-
+ self.send_response(200)
self.wfile.write(form_html)
def requestRegistrationData(self, request):
--
1.7.10.4
More information about the Code
mailing list