Unexpected 302 in HTTP Header
Hi, I have a form that submits to a python script. The python script "returns" a DTML method but Zope never displays that DTML method - it redirects to another page and I definitely didn't tell it too. I tried to debug this with tcpwatch and a "302" showed up in the HTTP Header with the rendered content of the DTML method without any exceptions showing up. I am confident that there is no "redirect" in my code. Is there a place in ZPublisher's HTTPResponse.py where I can add some logging code as a way to track this down? I'm using Zope 2.4.4. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
Roché Compaan wrote:
I am confident that there is no "redirect" in my code.
Is there a place in ZPublisher's HTTPResponse.py where I can add some logging code as a way to track this down?
Hmmm... have a hunt for the redirect method of the HTTPResponse class in that file. Add somethign which prints out the stack trace (--> python's traceback module) and see where it's being called... cheers, Chris
Roché Compaan wrote:
I am confident that there is no "redirect" in my code.
Is there a place in ZPublisher's HTTPResponse.py where I can add some logging code as a way to track this down?
Hmmm... have a hunt for the redirect method of the HTTPResponse class in that file. Add somethign which prints out the stack trace (--> python's traceback module) and see where it's being called...
The odd thing is "redirect" in HTTPResponse.py is not being called. I'm checking setStatus calls at the moment and ... I'm really really baffled. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
I'll just go back to my hole now - I found the redirect ... hidden in my own code :-0 Still don't know why "redirect" in HTTPResponse.py isn't called.
I am confident that there is no "redirect" in my code.
Is there a place in ZPublisher's HTTPResponse.py where I can add some logging code as a way to track this down?
Hmmm... have a hunt for the redirect method of the HTTPResponse class in that file. Add somethign which prints out the stack trace (--> python's traceback module) and see where it's being called...
The odd thing is "redirect" in HTTPResponse.py is not being called. I'm checking setStatus calls at the moment and ... I'm really really baffled.
Roché Compaan wrote:
I'll just go back to my hole now - I found the redirect ... hidden in my own code :-0
*grinz*
Still don't know why "redirect" in HTTPResponse.py isn't called.
Well, what was the bitof code that did the redirect? Sometimes redirects are raised rather than being generated by setStatus orResponse.redirect... cheers, Chris
I'll just go back to my hole now - I found the redirect ... hidden in my own code :-0
*grinz*
Still don't know why "redirect" in HTTPResponse.py isn't called.
Well, what was the bitof code that did the redirect?
Sometimes redirects are raised rather than being generated by setStatus orResponse.redirect...
Simply REQUEST.RESPONSE.redirect. I would have thought that this call is the redirect method of the HTTPResponse class ... But let met not express superlative confidence about what I saw and did not see any more - strange things happens to one's brain after merging multiple CVS branches ;-) -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
Roché Compaan wrote:
Simply REQUEST.RESPONSE.redirect.
I would have thought that this call is the redirect method of the HTTPResponse class ...
...unless the response you were playing with is a subclass of this which overrides the redirect method :-S Just a guess... cheers, Chris
participants (2)
-
Chris Withers -
Roché Compaan