5 messages in ru.sysoev.nginxRe: [ANN] mod_wsgi draft
FromSent OnAttachments
Manlio PerilloSep 15, 2007 9:33 am 
Adrian Perez de CastroSep 15, 2007 11:21 am 
Manlio PerilloSep 15, 2007 11:40 am 
Adrian Perez de CastroSep 16, 2007 1:55 pm 
Manlio PerilloSep 18, 2007 10:39 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [ANN] mod_wsgi draftActions...
From:Adrian Perez de Castro (adri@public.gmane.org)
Date:Sep 16, 2007 1:55:24 pm
List:ru.sysoev.nginx

El Sat, 15 Sep 2007 20:40:44 +0200 Manlio Perillo <manlio_perillo-VGgt2q2+T+FeoW@public.gmane.org>
escribió:

I hope that we can cooperate. If the interest about mod_wsgi is high, I can evalutate the possibility to move it to a better place, with a mailing list and a bug tracker.

I think there is no need to move development right now. Maybe in the (near?) future, when more people gets interested (and I hope people will be).

To access the code I installed Mercurial and it feels a lot like Bazaar (with some differences, BTW), and I feel quite comfortable with it, so I think I will be able of following your changes and sending patches when appropriate :D

I'm waiting your review! I hope that the code is easy to read, I'm not very fluent with C, and with its coding styles (I'm a Python programmer).

I hadn't enough spare time, so I only did a small test-drive of it: I built it with Nginx 0.6.11 and ran the example test script succesfully. The module nearly builds with the 0.6.x sources, only a one-line change is needed in ngx_http_wsgi_module.c (about line 476 in changeset #45):

diff -r 11aad9f59b05 src/ngx_http_wsgi_module.c --- a/src/ngx_http_wsgi_module.c Sat Sep 15 18:45:40 2007 +0200 +++ b/src/ngx_http_wsgi_module.c Sun Sep 16 22:43:55 2007 +0200 @@ -473,7 +473,7 @@ ngx_http_wsgi_handler(ngx_http_request_t

if (r->method == NGX_HTTP_GET || r->method == NGX_HTTP_HEAD) { /* XXX not sure */ - rc = ngx_http_discard_body(r); + rc = ngx_http_discard_request_body(r);

if (rc != NGX_OK && rc != NGX_AGAIN) { return rc;

It would be nice to have some proprocessor #define with the major, minor and micro version numbers of Nginx, so we could do things like:

#if (NGINX_MAJOR >= 0) && (NGINX_MINOR >= 6) rc = ngx_http_discard_request_body(r); #else rc = ngx_http_discard_body(r); #endif

The header src/core/nginx.h already defines NGINX_VERSION which is a string, so the autoconf scripts could extract components from it. Maybe Igor agrees with approach or knows a better way of detecting the Nginx version at compile time.

I have used Emacs with gnu mode to edit the code.

Everyone will be able of using their preferred editor if indentation is done consistently (i.e. always spaces or always tabs, without mixing them). I use Vim and it looks right :-)

I hope to have some more time next week, stay tuned.

Best regards,

P.S. Just for the sake of completeness, my development machine is an iBook G3 (PowerPC 750FX), with Gentoo GNU/Linux. I can do some testing with the AMD64 machines we have at work if needed.