Re: [PHP] Re: Does Location: headers constantly
On Fri, Jul 05, 2002 at 01:56:58AM -0500, Miguel Cruz wrote: > > Interesting. What tests did you perform? I used similar things, including a file('test.php') statement in another php script and using GET from the command line. telnet is a good test, but I didn't have it available at the time. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Does Location: headers constantly
On Thu, Jul 04, 2002 at 11:01:50AM +0100, Ford, Mike [LSS] wrote: > > I can't let this go unchallenged -- what happens if you're sending this to a > browser which *doesn't* honour the "Location: " header, but *is* capable of > displaying any attached page content? The poor user will be left with a > completely blank screen, and no hint of why. In fact, the HTTP/1.1 spec But, which browser is incapable of handling location headers? > (RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.html) even says: > > > Unless the request method was HEAD, the entity of the response > > SHOULD contain a short hypertext note with a hyperlink to the > > new URI(s). Oddly, I don't find that text you excerpted on the URI you provided. But, the thing is, I'm under the impression that PHP (and/or Apache?) doesn't send anything else from your script once a Location header is sent. I just confirmed this with two different tests. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Does Location: headers constantly
> -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED]] > Sent: 03 July 2002 21:17 [...] > > It's a good idea to get in the habit of doing: > > header("Location: xxx"); > exit; > > There's no point in sending any more data after the Location: > header anyway, I can't let this go unchallenged -- what happens if you're sending this to a browser which *doesn't* honour the "Location: " header, but *is* capable of displaying any attached page content? The poor user will be left with a completely blank screen, and no hint of why. In fact, the HTTP/1.1 spec (RFC 2616: http://www.w3.org/Protocols/rfc2616/rfc2616.html) even says: > Unless the request method was HEAD, the entity of the response > SHOULD contain a short hypertext note with a hyperlink to the > new URI(s). So at the very least you should do something like this: header("Location: xxx"); ?> Moved to xxx This page has moved to xxx. http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php