List Info

Thread: Bug?: Unable to use custom dispatcher on application mount point




Bug?: Unable to use custom dispatcher on application mount point
country flaguser name
United States
2007-10-04 06:31:30
Hello,

(I knew  I should probably use trac and fill this as
bugreport, but I
haven't found a login)

I found myself unable to use custom dispatcher at
application root in
any way.

I have one application at /, second at /app. I'd like app to
attach
dispatcher to both / and /app, which will redirect request
with
certain headers to /app/index and handling rest normally.

Problem is, that clients are asking for /app?s=blahblah (and
I cannot
change it), instead of /app/?s=blahblah. Application at
mount point /
app is recognized (thus dipatcher on / has no effect), and
thus
path_info is empty string. Thus, request.get_resource() has
no chance
for loading proper dispatcher (because of while path_info
chunk).

Quick hack is to add

if not trail:
    tail = '/'

before while cycle. This allows root dispatcher to be
resolved.

Or am I something missing and there is some other obvious
solution
(which do not require us to patch cherrypy)?

Thanks,

Almad


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Bug?: Unable to use custom dispatcher on application mount point
country flaguser name
United States
2007-10-04 09:51:30
Have you tried:

https://code.cherrypyessentials.com/tr
unk/Chapter_4/tool_trailing_slash.py

- Sylvain

Almad wrote:
> Hello,
> 
> (I knew  I should probably use trac and fill this as
bugreport, but I
> haven't found a login)
> 
> I found myself unable to use custom dispatcher at
application root in
> any way.
> 
> I have one application at /, second at /app. I'd like
app to attach
> dispatcher to both / and /app, which will redirect
request with
> certain headers to /app/index and handling rest
normally.
> 
> Problem is, that clients are asking for /app?s=blahblah
(and I cannot
> change it), instead of /app/?s=blahblah. Application at
mount point /
> app is recognized (thus dipatcher on / has no effect),
and thus
> path_info is empty string. Thus, request.get_resource()
has no chance
> for loading proper dispatcher (because of while
path_info chunk).
> 
> Quick hack is to add
> 
> if not trail:
>     tail = '/'
> 
> before while cycle. This allows root dispatcher to be
resolved.
> 
> Or am I something missing and there is some other
obvious solution
> (which do not require us to patch cherrypy)?
> 
> Thanks,
> 
> Almad
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Bug?: Unable to use custom dispatcher on application mount point
country flaguser name
United States
2007-10-04 10:26:50
Hi,

my problem is that clients requests are POST.
InternalRedirect is
sending GET instead (and I thing that trailing slash tool
too, but I'm
not at cherrypy server to try).

Almad

On 4 Říj, 16:51, Sylvain Hellegouarch <s...defuze.org> wrote:
> Have you tried:
>
> https://code.cherrypyessentials.com/trun
k/Chapter_4/tool_trailing_sla...
>
> - Sylvain


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )