You are here: Re: header() « PHP Programming Language « IT news, forums, messages
Re: header()

Posted by John Dunlop on 10/14/06 12:56

Bob Arn:

> [sree:]

> > header("Location: myaccount.php?suc=password changed successfully");

RFC2616 states that Location must be a URI not a relative reference,
and RFC3986 states that URIs cannot contain unencoded spaces.
User-agent error recovery probably means both that the Request-URI from
the original request is understood as the base URI from which the
relative reference is resolved and that the value of Location is taken
as everything up until the first space.

> try: suc=password+changed+successfully

Plus signs do have advantages over %20 in that they are two characters
shorter, they render the URL more readable, and in this case they are
intuitively better suited to concatenation. However, HTTP/1.1 does not
assign any special meaning to <+>; nowhere does it say that <+> means a
space. Where <+> does mean a space is in the
application/x-www-form-urlencoded content type, as described in
HTML4.01 sec. 17.13.4.

I would percent-encode spaces here.

--
Jock

 

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

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