[Phpmyadmin-devel] urlencode for POST data in tbl_change.php?
Sebastian Mendel
lists at sebastianmendel.de
Fri Dec 8 15:44:09 CET 2006
Marc Delisle schrieb:
> Sebastian Mendel a écrit :
>> Sebastian Mendel schrieb:
>>> Hi,
>>>
>>> is there any reason why the data is urlencoded when submitted with POST?
>>>
>>> [...]
>> data in forms is urlencoded by the client (browser) if submitted with
>> GET and automatically encoded on server
>>
>> so using urlencode results double encoded data
>
> Here is my newbie question. In the case you mention, we are using POST
> so is the data automatically encoded when using POST?
POST-data does not need encoding
encoding is only need in GET-Request param to differ between var and
value by = and vars by & or ;, and filename and ? from the target
URL/file/script
as with POST the GET REQUEST is only the target filename (script), so
there is no need to encode the POSTed stuff
(except with htmlspecialchars() before printing out the form to the
client ;-) )
however, the client (browser) is responsible for encoding the data in a
form - whether submitted by GET or POST
and the server for decoding
i am not
only self crafted URLs need to be handled by the developer
> If yes, you are right, we should not encode it (and not decode it later
> in tbl_replace.php). For example, sql_query is decoded later.
>
> Did you find some bug with this?
not really a bug, if you not call it a bug to do things twice ...
but at least it makes overhead and complicates the source
--
Sebastian Mendel
www.sebastianmendel.de
More information about the Developers
mailing list