2009-11-27 | Paul Boddie | file changeset files shortlog | Changed authentication tokens to use UTF-8, not ISO-8859-1 which was presumably in use as a safe interpretation of bytes, but would not be appropriate as a target encoding for Unicode objects. Changed OpenID redirection to include the query string, although this should be tested with the example resources. Added HTML-level character set information for the OpenID identity examples, although python-openid's HTML parsing doesn't respect the encoding, at least in release 2.0.2. |
paulb@445 | 1 | --- Adapters/CGIAdapter.py 2005-08-25 01:09:02.759432184 +0200 |
paulb@445 | 2 | +++ Adapters/CGIAdapter.py 2005-08-25 01:09:05.778973144 +0200 |
paulb@445 | 3 | @@ -48,7 +48,7 @@ |
paulb@445 | 4 | msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) |
paulb@445 | 5 | |
paulb@445 | 6 | myInput = '' |
paulb@445 | 7 | - if os.environ.has_key('CONTENT_LENGTH'): |
paulb@445 | 8 | + if os.environ.has_key('CONTENT_LENGTH') and os.environ['CONTENT_LENGTH']: |
paulb@445 | 9 | length = int(os.environ['CONTENT_LENGTH']) |
paulb@445 | 10 | myInput = myInput + sys.stdin.read(length) |
paulb@445 | 11 |