On 15 February 2011 01:01, johnm <[email protected]> wrote: > > > On Feb 14, 4:02 pm, Jason Garber <[email protected]> wrote: >> Hi John, >> >> It would be quite possible to write a wsgi layer which takes output like you >> said, parses the status and headers (until blank line) and transparently >> calls start_response(), returning the rest of the content wrapped in >> iterable. >> >> Your app would simply return a full http response. >> >> Would that suffice? > > In my case, that would require extra processing for zero benefit. That > is why I was hoping to be able to bypass the start_response() call > requirement in any form. Ideally, for my situation, I'd like to be > able twiddle a setting which mod_wsgi would take as being: "don't > check that status and headers have been given; just send the body" > with the assumption that the body contains all that is needed to > satisfy an HTTP request. This could be as easy as: > start_response(None, None) > > I realize that the wsgi spec (1.0 or 2.0) wants the status and headers > to be provided apart from the body. I don't care about the middleware > aspect, I just want to use mod_wsgi as a bridge between apache and an > existing server which provides HTTP responses in the stream (and > mod_proxy won't do the trick).
Why wont mod_proxy do the trick? What part of the response headers isn't it leaving alone? If you can't get mod_proxy to work, then only other thing I can think of is you use a CGI script which acts as a proxy. Such as: http://www.jmarshall.com/tools/cgiproxy/ This requires Apache to be setup for Non-Parsed Header (NPH) mode and any back end server headers should get passed through as is presuming the cgiproxy itself doesn't fiddle with them. Otherwise you will need to write your own simply cgiproxy equivalent. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
