Skip to content

Commit

Permalink
Added the following patch from the dev@openidenabled.com mailing list:
Browse files Browse the repository at this point in the history
http://lists.openidenabled.com/pipermail/dev/attachments/20090401/b0bd173c/attachment.bin

Original Message:
seth at lindenlab.com
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/mod_headers.so
		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 484af3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion openid/fetchers.py
Expand Up @@ -249,7 +249,11 @@ def _parseHeaders(self, header_file):
header_file.seek(0)

# 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
Expand Down

0 comments on commit 484af3d

Please sign in to comment.