[Web-SIG] Communicating authenticated user information
Ian Bicking
ianb at colorstudy.com
Tue Jan 24 17:53:53 CET 2006
Jim Fulton wrote:
> Phillip J. Eby wrote:
> ...
>
>>I'm pointing out that the use case under consideration isn't specific
>>*enough* yet. Do people's log files support unicode? Do the
>>authentication systems? This hasn't been made clear, and it should be.
>
>
> I agree. I think we should be guided by the common log file format.
> Log data are written to files and are thus not unicode. The user
> info is *just* documentation, so it is really up to the app what to
> show imo. Further, because the common log file format is space
> delimited, the user info cannot contain spaces.
In theory the log file could be encoded in some way, and could include
spaces in usernames. Maybe in this case unicode should be allowed, and
spaces allowed, with the caveat that the log file may not represent
this? So for a common log:
if isinstance(username, unicode):
username = username.encode('ascii', replace)
username = username.replace(' ', '')
It is up to the consumer to handle any unicode, and to maintain the
integrity of their log format regardless of input.
--
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Web-SIG
mailing list