php forum
php mysql forum
php mysql smarty
 
Topic Options
#102451 - 03/16/01 08:40 PM Problem with Netscape and Location header
Dave_L Offline
Member

Registered: 08/16/00
Posts: 356
Loc: Virginia, USA
I'm using an HTTP Location header to redirect to the URL of the same script, with the query string removed.

...
my $q = CGI::->new();
...
print $q->redirect(-url=>$q->url());

In Internet Explorer 4.01 SP1 this works as desired.

In Netscape Navigator 4.08 and 4.5 it results in a "document contains no data" error, as if Netscape doesn't understand the Location header, and expects the HTTP response to have content.

If I redirect to a different URL, it works fine in Netscape.

Any suggestions? confused

Top
#102452 - 03/16/01 08:56 PM Re: Problem with Netscape and Location header
J.C. Offline
Addict

Registered: 08/11/00
Posts: 1551
Does the program run in IE or do you get no error page? You have to turn on error return pages on scripts in IE.
_________________________
- Custom Web Development
http://www.JCSWebDev.com

Top
#102453 - 03/16/01 09:05 PM Re: Problem with Netscape and Location header
Mark Badolato Offline
P.I.T.A. / Programmer

Registered: 09/08/00
Posts: 836
Loc: Land O' Cactus
Are you printing a regular header too ($q->header)?

If so, that could be the issue. I believe (don't remember for sure) that a redirect should be its own header.

--mark
_________________________
"Annnnnnnndd now, opening for Iron Maiden...... WYLD STALLYNS!!!" --Bill S. Preston, Esquire and Ted "Theodore " Logan

Top
#102454 - 03/16/01 09:24 PM Re: Problem with Netscape and Location header
Dave_L Offline
Member

Registered: 08/16/00
Posts: 356
Loc: Virginia, USA
C_P:

The script works correctly in IE.

Mark:

Only the location header is printed, e.g.,

Status: 302 Moved
Date: Sat, 17 Mar 2001 01:26:26 GMT
Location: actual URL here

Top
#102455 - 03/23/01 07:45 AM Re: Problem with Netscape and Location header
Dave_L Offline
Member

Registered: 08/16/00
Posts: 356
Loc: Virginia, USA
In case anyone's interested, I solved this by using a workaround based on a suggestion in a newsgroup.

I add a unique, dummy query string parameter to the URL:

Code:
code:


It's ugly, but it works.

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks