Before doing that, im not sure if it goes side by side with specs,
that i read from above link. It says:

Request-Line   = Method SP Request-URI SP HTTP-Version CRLF

SP suppose to mean SPACE, so i think url should have space characters
already converted to %20. But the problem here is, that when i was
testing with safari and firefox, safari handled all spaces by putting
%20 automatic on urls, while firefox changed all %20 to empty spaces,
which caused problem on wsgiserver. And that happened only if i used
mod_rewrite [P].

My configuration is Apache2 with mod_proxy&mod_rewrite, Python 2.5 on
Debian etch + web2py 1.49

I'll contact cherrypy to consult more with this case.

-Marko

On 21 joulu, 14:57, mdipierro <mdipie...@cs.depaul.edu> wrote:
> looking at this again. Your patch is right but you are changing
> wsgiserver which is the cherrypy wsgi server. I think you should
> submit this patch to cherrypy.
>
> Massimo
>
> On Dec 21, 4:37 am, mmstud <mms...@gmail.com> wrote:
>
> > I had to modify main.py:~288
>
> > #method, path, req_protocol = request_line.strip().split(" ", 2)
> > _reg = request_line.strip().split(" ")
> > method, path, req_protocol = [_reg[0], " ".join(_reg[1:-1]), _reg[-1]]
>
> > to overcome this situation. I need to read protocol specs though to
> > get it surely 
> > right:http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2
>
> > -Marko
>
> > On 20 joulu, 17:27, mmstud <mms...@gmail.com> wrote:
>
> > > Im getting this error when playing with spaces on url:
>
> > > Traceback (most recent call last):
> > >   File "/***/web2py/gluon/wsgiserver.py", line 762, in communicate
> > >     req.parse_request()
> > >   File "/***/web2py/gluon/wsgiserver.py", line 258, in parse_request
> > >     self._parse_request()
> > >   File "/***/web2py/gluon/wsgiserver.py", line 334, in _parse_request
> > >     rp = int(req_protocol[5]), int(req_protocol[7])
> > > ValueError: invalid literal for int() with base 10: 't'
>
> > > I made suggested modification to main.py. Im using mod_proxy and
> > > mod_rewrite:
>
> > > RewriteRule   ^browse/(.*)              
> > > http://127.0.0.1:8007/kt/default/browse/$1
> > > [P]
>
> > > Spaces in url does work (not raising error), if not using mod_rewrite.
>
> > > Im requestinghttp://127.0.0.1:8007/kt/default/browse/thisisatest
>
> > > And debugging req_protocol gives:
>
> > > is a test HTTP/1.1
> > > HTTP/1.1
>
> > > -Marko
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to