Please let me know what the Pylons/Paste people have to say about it. I raised this problem before on Python WEB-SIG, where Ian Bicking and others listen and they never commented. That issue I referenced has a reference to the Python WEB-SIG discussion.
Anyway, since this has now come up a second time, I better make a concrete change in mod_wsgi to flag it as an error, or somehow cope with it. Problem is I felt that no consensus came out of discussion on Python WEB-SIG so don't know what WSGI folks believe should be done. Graham 2008/9/17 Jorge Vargas <[EMAIL PROTECTED]>: > > FIrst of all thank you very much for all your help. See response below. > > On Tue, Sep 16, 2008 at 11:02 PM, Graham Dumpleton > <[EMAIL PROTECTED]> wrote: >> >> 2008/9/17 Graham Dumpleton <[EMAIL PROTECTED]>: >>> 2008/9/17 Graham Dumpleton <[EMAIL PROTECTED]>: >>>>> Note that mod_wsgi doesn't generate a 'Connection' header, but Apache >>>>> underneath it can for case where error response is being generated. I >>>>> wouldn't expect therefore to see a 'Connection' header in debug output >>>>> from that script as I don't think a WSGI application is supposed to be >>>>> generating them, but check anyway. >>> >>> And below is the hideous bit of Apache code that determines whether it >>> forces a close. I always cringe when I look at this particular bit of >>> code. >>> >>> Worth noting is that it will look from 'Connection: close' from an >>> application so actually reasonable that WSGI application could return >>> it. >>> >>> As for capturing output from WSGI application with that debug code I >>> pointed out, you may want to change the pprint calls so they use >>> repr() instead. This way it will show if any garbage characters from >>> Unicode or something getting passed through in response headers when >>> they shouldn't. >> >> Also perhaps look out for: >> >> http://code.google.com/p/modwsgi/issues/detail?id=81 >> >> In embedded mode of mod_wsgi if a response header value has embedded >> new lines in it, that isn't being fixed up and so can pass through >> back to client. This could cause a strict checking proxy to fail. >> > I think this one nailed it, together with the debugging using repr. > here is the extract from the logs. > > [Wed Sep 17 01:53:26 2008] [error] [client 127.0.0.1] ('RESPONSE',, > referer: http://dev.activengine.com/ > [Wed Sep 17 01:53:26 2008] [error] [client 127.0.0.1] '302 Found',, > referer: http://dev.activengine.com/ > [Wed Sep 17 01:53:26 2008] [error] [client 127.0.0.1] > "[('content-type', 'text/html; charset=UTF-8'), ('Pragma', > 'no-cache'), ('Cache-Control', 'no-cache'), ('location', > 'http://dev.activengine.com/'), ('Content-Length', '237'), > ('Set-Cookie', > 'tw_auth=RPhlpOBTs4Z9jGkro9iFjY0VKW4yMDA4MDkxODA2NTNSRU1PVEVfVVNFUj1tYWU~\\\\n; > Path=/;')]"), referer: http://dev.activengine.com/ > > see how the Set-Cookie header is adding "\\\\n" that is a newline, so > it seems paste.auth is responsible. > > bottom line it seems like paste.auth.cookie.AuthCookieHandler or the > middleware on top of it. is causing a bad header, and it has nothing > to do with this "connection". I'll try to reproduce the issue without > pylons in the middle and see if I can track it down on paste. > > Again thank you. > >> In other words, may be nothing to do with 'Connection: close' but >> simply part of a value being interpreted as being a header name but >> failing as not a valid format for a header line. >> >> Graham >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to modwsgi@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---