You are here: Re: Passing objects from one page to another « All PHP « IT news, forums, messages
Re: Passing objects from one page to another

Posted by Jerry Stuckle on 11/12/06 22:02

Andy Hassall wrote:
> On Sat, 11 Nov 2006 22:31:23 -0500, Jerry Stuckle <jstucklex@attglobal.net>
> wrote:
>
>
>>Michael Fesser wrote:
>>
>>>.oO(Jerry Stuckle)
>>>
>>>
>>>>And there isn't a browser currently made which doesn't understand the
>>>>relative URI here.
>>>
>>>Browsers are not the only user agents. It's impossible to test them all,
>>>so you can't be sure that all of them will handle a relative redirect
>>>with a query string correctly. Some of them even show a warning (Lynx
>>>for example).
>>
>>True, some are better than others. But can you name one http agent
>>which doesn't understand relative URI's?
>
> [for context: in Location response headers]
>
> If you search Google, you will find several references where HTTP client
> libraries in various languages fail when they encounter invalid Location
> headers, and some other cases where there are issues with the code added to
> work around the invalid Location headers - and so it goes on.
>

That isn't what I asked, Andy. And how many of those libraries actually
apply to this problem.

<snip>
>
> Back in the real world, here's an example, let's call it redirect.php:
>
> <?php
> if (isset($_GET['value']))
> {
> print $_GET['value'];
> }
> else
> {
> header('Location: ?value=test');
> }
> ?>
>
> Let's say that's on http://example.com/redirect.php
>
> Access it with Firefox 2.0, IE 7 and Opera 9.02 and you get redirected to:
> http://example.com/redirect.php?value=test
>
> Access it with cURL 7.14.0, Lynx 2.8.5 and it takes you to:
> http://example.com/?value=test
>
> Access it using PHP 5.2.0's HTTP fopen wrapper and it takes you to:
> http://example.com//?value=test
> (complete with weird double slash).
>
> I wasn't trying very hard to find a case that would produce inconsistent
> results, and I found one straight off. That's enough of an indication of the
> can of worms that is opened by not following the standards to continue to
> always insist that you always write absolute Location headers.
>

Again, how does that apply to this problem?

I'm not saying you shouldn't use them. I'm saying that's not the
original poster's problem.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация