[mod_python] mod_python.publisher

Ian Clelland ian at veryfresh.com
Thu Aug 29 14:29:40 EST 2002


On Thu, Aug 29, 2002 at 02:40:19PM -0700, kai at keliikuli.com wrote:
> I had an authentication header problem with opera 6.0.2 
> on Linux (Slackware 8.1).  I traced it to Lines 250 
> and/or 263 of mod_python.publisher...

> opera doesn't like the spaces between realm,=, and "%s"' % realm

Interesting; sounds like Opera is broken in this respect. The spec is quite 
clear in that white space is allowed between tokens and separators. (Of 
course, none of the WWW-Authenticate examples ever use any spaces, so I can 
see where this might have been missed.)

> s = 'Basic realm="%s"' % realm
> which produces this header line
> WWW-Authenticate: Basic realm = "Members Only"\r\n

In the spirit of 'be conservative in what you send, and liberal in what you 
accept', I think that this change should be made to the Publisher source, 
at least for the next release. In the meantime, perhaps someone should file 
a bug report with the Opera team about this. They should be accepting the 
header with spaces in the formatting.

> I then tested it on a few others with the above change:
> 
> MSIE 6.0.2600.0000 ( what's with that version numbering? ): OK
> Mozilla 1.0: OK
> 
> I'm going to test on some more but being lazy I thought I'd 
> ask if anybody knows of any browsers and the versions thereof
> which are fussy about the WWW-Authenticate line

I don't think that any other browsers will have problems with the terser 
format 'realm="name"', since that's what Apache uses by default, and I've 
never heard of a browser not understanding Apache's basic authentication.


Ian Clelland
<ian at veryfresh.com>



More information about the Mod_python mailing list