Browse files

Added the following patch from the mailing list:

Original Message:
seth at
Wed Apr 1 16:29:08 PDT 2009
darcs patch: 100-continue-in-parseHeaders

	"In my openid testbed, if:
	(1) my RP and OP establish a session
	(2) the OP's session database is deleted
	(3) the RP tries to validate an identity
	(4) the OP's response includes invalidate_handle

	then the RP ends up POSTing to the OP.  During this interaction, curl
	sets the Expect: 100-Continue header, and apache2 reacts to it.  Then,
	CurlHTTPFetcher._parseHeaders gets confused -- it strips off the first
	line (the HTTP/1.1 100 Continue line), then sees a blank line, and
	assumes there are no headers.  One way to fix this is to add

		LoadModule headers_module /usr/lib/apache2/modules/
		RequestHeader unset Expect early

	to the apache2 config on the OP, but this patch also worked."

This patch was in the form of a Darcs patch, not a normal patch.  So solve this, I applied it to the Darcs repository found on openidenabled, then created a new diff file between the original Darcs repo and the new one (with the patch applied) so that I could apply it to this git repo.

All hunks succeeded
  • Loading branch information...
Lilli committed Feb 12, 2010
1 parent ab35336 commit 484af3d67c6643b2788a2c5296b2d2d5244d7c7b
Showing with 5 additions and 1 deletion.
  1. +5 −1 openid/
@@ -249,7 +249,11 @@ def _parseHeaders(self, header_file):
# Remove the status line from the beginning of the input
- unused_http_status_line = header_file.readline()
+ unused_http_status_line = header_file.readline().lower ()
+ if unused_http_status_line.startswith('http/1.1 100 '):
+ unused_http_status_line = header_file.readline()
+ unused_http_status_line = header_file.readline()
lines = [line.strip() for line in header_file]
# and the blank line from the end

0 comments on commit 484af3d

Please sign in to comment.