Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

uwsgi + webpy + cherokee, where does my leading / go?

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


stefan at konink

Mar 28, 2011, 7:28 AM

Post #1 of 2 (294 views)
Permalink
uwsgi + webpy + cherokee, where does my leading / go?

Hi there,


I was doing webpy development with uwsgi. (Yes I know: don't do that ;)

Now i'm using:

default: uwgsi (that sounds simple right?)

My trivial script:

import web

urls = (
'/(.*)', 'hello'
)
app = web.application(urls, globals())
web.config.debug = True

class hello:
def GET(self, name):
if not name:
name = 'World'
return 'Hello, ' + name + '!'
application = app.wsgifunc()


And it is all nicely started.
[pid: 1085|app: 0|req: 3/3] 83.80.160.11 () {54 vars in 1091 bytes} [Mon
Mar 28 16:09:36 2011] GET / => generated 9 bytes in 2 msecs (HTTP/1.1 404)
1 headers in 51 bytes (0 async switches on async core 0)

Still I get 404 messages. Odd isn't it?


Now with a bit of creativity I ended up with removing the '/' before the
(.*) and suddenly everything worked.

Can someone elaborate on this any further? This is plainly bizarre.


Stefan
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


david at cloudartisan

Mar 29, 2011, 12:42 AM

Post #2 of 2 (281 views)
Permalink
Re: uwsgi + webpy + cherokee, where does my leading / go? [In reply to]

IIRC, uWSGI strips off the matching part of the URI before handing off to the application.



On 29/03/2011, at 1:28 AM, Stefan de Konink <stefan [at] konink> wrote:

> Hi there,
>
>
> I was doing webpy development with uwsgi. (Yes I know: don't do that ;)
>
> Now i'm using:
>
> default: uwgsi (that sounds simple right?)
>
> My trivial script:
>
> import web
>
> urls = (
> '/(.*)', 'hello'
> )
> app = web.application(urls, globals())
> web.config.debug = True
>
> class hello:
> def GET(self, name):
> if not name:
> name = 'World'
> return 'Hello, ' + name + '!'
> application = app.wsgifunc()
>
>
> And it is all nicely started.
> [pid: 1085|app: 0|req: 3/3] 83.80.160.11 () {54 vars in 1091 bytes} [Mon Mar 28 16:09:36 2011] GET / => generated 9 bytes in 2 msecs (HTTP/1.1 404) 1 headers in 51 bytes (0 async switches on async core 0)
>
> Still I get 404 messages. Odd isn't it?
>
>
> Now with a bit of creativity I ended up with removing the '/' before the (.*) and suddenly everything worked.
>
> Can someone elaborate on this any further? This is plainly bizarre.
>
>
> Stefan
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.