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?

Jg

On Feb 14, 2011 10:19 AM, "johnm" <[email protected]> wrote:
>
>
>
> On Feb 12, 12:20 am, Graham Dumpleton <[email protected]>
> wrote:
> > On 12 February 2011 03:36, johnm <[email protected]> wrote:
> >
> > > Hi,
> >
> > > Note: I realize that what I am asking to do violates the wsgi spec.
> >
> > > Is there any way for me to use mod_wsgi and not provide the response
> > > status and headers via start_response but instead as part of the body
> > > (all properly formatted, of course)?
> >
> > What you do in the layers above the WSGI interface is up to you. You
> > don't need to preserve the WSGI interface up through all layers of
> > your application. As example, Django is not WSGI throughout. Instead,
> > Django has a WSGI adapter that maps into its own internal stack. So,
> > you can do something similar.
> >
> > FWIW, eliminating start_response() is the essence of what people were
> > originally wanting to do in WSGI 2.0, although that hasn't progressed
> > and the waters have been muddied by people subjugating the WSGI 2.0
> > moniker for there own ends and trying to apply it to quite different
> > proposals. So, want you are after is an adapter which maps to an
> > interface akin to what people were originally wanting for WSGI 2.0.
> > So, something like the following (untested):
>
> But this still requires that the status, headers, and body are
> all distinct. Is it possible to return only a body which itself
> contains
> the status, headers, and body proper in a stream? E.g., the body _is_:
>
> -----
> HTTP/1.1 200 Ok
> Content-Type: text/plain
>
> hello
> -----
>
> Thanks,
> John
>
> --
> 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.
>

-- 
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.

Reply via email to