Chris Withers wrote:
Benji York wrote:
In this case we'd have to mark all characters but the space as "safe". This isn't the "normal" type of URI quoting issue, this problem arises because nothing else in the call chain quotes the spaces

Ah, okay, nice to have would be a docstring to avoid people like me misinterpretting what the method is for.

Two of the three lines of _quote are comments about why the method exists, is there something that you'd like added? Perhaps it shouldn't be a method at all, but refactored to be inline (with comments).

(Mechanize or urllib) because they don't need to, but HTTPCaller does a .split() on the first line of the request so there can be no unexpected spaces. Any other character is acceptable.

Hmm, is it correct for HTTPCaller to do a split like this?

Maybe a .split(' ',3) or whatever would be better?

That, specifically, wouldn't work, but no matter; the RFC is pretty clear that there can be no more than 2 space characters in the first line of the request, so I don't really think anything different should be done.
Benji York
Senior Software Engineer
Zope Corporation
Zope3-dev mailing list

Reply via email to