Win32 ASP Problems (Response.Redirect)

Jim Abrams jim at publishingresources.com
Thu May 30 14:19:55 EDT 2002


Similar problems with Redirect as with End

<%@LANGUAGE="Python"%>
<%
Response.Redirect('/')

open("D:\\testlog.txt", 'w').write("To be... or not to be.")
%>

File is created with message.

Changes to the case of redirect have no change.

So how about this:

<%@LANGUAGE="Python"%>
Some text
<%
Response.Redirect('/')
Response.end()

open("D:\\testlog.txt", 'w').write("To be... or not to be.")
%>

Aha! No file creation. But what really happened?


<%@LANGUAGE="Python"%>
Some text
<%
Response.Redirect('/')

try:
	Response.end()
except:
	open("D:\\testlog.txt", 'w').write("To be... or not to be.")
%>

Bingo. There's a Type Error in there, because, if I guess properly, after 
Redirect the Response object gets freed and is None.


Sooo... help?

Ideas? Where can I report bugs?






More information about the Python-list mailing list