Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/ fix bug caused be impedance mis-match between Mechanize and zope.testbrowser

2005-12-16 Thread Chris Withers

Benji York wrote:
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).


Inline would be the way I'd go, as it'll stop people (mis)using the 
method in future...


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.


Yup, glad someone has the patience to wade through RFC's :-)

Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/ fix bug caused be impedance mis-match between Mechanize and zope.testbrowser

2005-12-12 Thread Benji York

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
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/ fix bug caused be impedance mis-match between Mechanize and zope.testbrowser

2005-12-09 Thread Chris Withers

Stephan Richter wrote:
I hope it would have sometimes a ? in them, since this is a totally valid 
character. also : will be in 90% of the URLs. The idea here is that we want 
to support those silly apple URLs.


OK, I guess my point was that there's a perfectly good library function 
that does this, and supports marking certain characters (suchs as ':') 
as safe if you want them to be, so I'm curious as to why we're growing 
our own warts?


Chris

--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/ fix bug caused be impedance mis-match between Mechanize and zope.testbrowser

2005-12-09 Thread Stephan Richter
On Friday 09 December 2005 06:09, Chris Withers wrote:
 OK, I guess my point was that there's a perfectly good library function
 that does this, and supports marking certain characters (suchs as ':')
 as safe if you want them to be, so I'm curious as to why we're growing
 our own warts?

Because we really just want to convert this one character; in this case it is 
much easier to write your own function.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/ fix bug caused be impedance mis-match between Mechanize and zope.testbrowser

2005-12-09 Thread Benji York

Chris Withers wrote:

Stephan Richter wrote:


I hope it would have sometimes a ? in them, since this is a
totally valid character. also : will be in 90% of the URLs.


True.


The idea here is that we want to support those silly apple URLs.


Not really sure what that's about.  Joke?


OK, I guess my point was that there's a perfectly good library
function that does this, and supports marking certain characters
(suchs as ':') as safe if you want them to be, so I'm curious as to
why we're growing our own warts?


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 (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.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: [Zope3-checkins] SVN: Zope3/trunk/src/zope/testbrowser/ fix bug caused be impedance mis-match between Mechanize and zope.testbrowser

2005-12-08 Thread Stephan Richter
On Thursday 08 December 2005 04:04, Chris Withers wrote:
 What happens with urls have other dodgy characters in them (?;:, etc)?

I hope it would have sometimes a ? in them, since this is a totally valid 
character. also : will be in 90% of the URLs. The idea here is that we want 
to support those silly apple URLs.

Regards,
Stephan
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com