Python CGI not working in Firefox but does in IE

H

Harlin Seritt

I have this Python CGI script running:

Code:
print 'Content-type: text/plain\n'

location = 'http://server1.com'

page = '''
<html>
<head>
<meta http-equiv="Refresh" content="0; URL='''+location+'''">
</head>
<body></body>
</html>'''

print page

It works fine and redirects perfectly when using Internet Explorer but
only shows this in a Firefox window:

[OUTPUT]
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=http://server1.com">
</head>
</html>
[/OUTPUT]

Is there anything I can do to fix this?

Also, is there a redirect command somewhere within Python CGI that can
get this done instead as I would actually prefer to have the CGI code
execute this rather than depend on the HTML to do it.

Thanks,

Harlin Seritt
 
I

Iain King

Harlin said:
I have this Python CGI script running:

Code:
print 'Content-type: text/plain\n'

location = 'http://server1.com'

page = '''
<html>
<head>
<meta http-equiv="Refresh" content="0; URL='''+location+'''">
</head>
<body></body>
</html>'''

print page

It works fine and redirects perfectly when using Internet Explorer but
only shows this in a Firefox window:

[OUTPUT]
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=http://server1.com">
</head>
</html>
[/OUTPUT]

Is there anything I can do to fix this?

Also, is there a redirect command somewhere within Python CGI that can
get this done instead as I would actually prefer to have the CGI code
execute this rather than depend on the HTML to do it.

Thanks,

Harlin Seritt

this snippet works (from code I wrote to implement a shoutbox):

print '''<html>
<head>
<meta http-equiv="refresh" content="0;URL='''+HOME+'''" />
</head>
<body>
<p>Please wait...</p>
</body>
</html>'''

I assume your version doesn't work because of the uppercase 'R'.

Iain
 
I

Iain King

Iain said:
Harlin said:
I have this Python CGI script running:

Code:
print 'Content-type: text/plain\n'

location = 'http://server1.com'

page = '''
<html>
<head>
<meta http-equiv="Refresh" content="0; URL='''+location+'''">
</head>
<body></body>
</html>'''

print page

It works fine and redirects perfectly when using Internet Explorer but
only shows this in a Firefox window:

[OUTPUT]
<html>
<head>
<meta http-equiv="Refresh" content="0; URL=http://server1.com">
</head>
</html>
[/OUTPUT]

Is there anything I can do to fix this?

Also, is there a redirect command somewhere within Python CGI that can
get this done instead as I would actually prefer to have the CGI code
execute this rather than depend on the HTML to do it.

Thanks,

Harlin Seritt

this snippet works (from code I wrote to implement a shoutbox):

print '''<html>
<head>
<meta http-equiv="refresh" content="0;URL='''+HOME+'''" />
</head>
<body>
<p>Please wait...</p>
</body>
</html>'''

I assume your version doesn't work because of the uppercase 'R'.

Iain

There's a well known phrase about the word 'assume'...

Iain
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top