Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML Form process of POST by Safari



It probably has to do with the fact that you are using a querystring for the action and the encoding type is set to url encode. Safari is appending the data to the action essentially creating a GET request instead of a post where the data is part of the message body.

I would recommend experimenting with removing enctype and/or droping the ?rm-login on the cgi and see what safari posts back then.

On Jun 23, 2004, at 11:18 AM, Leon Chen wrote:

I am testing with the following HTML with a simple test CGI on my OS X machine:


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; lang="en-US" xml:lang="en-US">
<head><title>Welcome</title></head>
<body>
<h3>Welcome </h3>
<form method="post" action="http://localhost/cgi-bin/test/cgi-bin/test?rm-login"; enctype="application/x-www-form-urlencoded" name="Form">
<h4><input type="submit" name="update" value="update particular" /></h4>
<input type="hidden" name="rm" value="update" /><div></div>
</form>
</body>
</html>


I found Safari behaves differently from IE and Netscape:

- I run it in Safari. I click the "update particular" button I got the URL like this:
http://localhost/cgi-bin/test?rm=login?rm=update which obviously created error


- When I run the same HTML on IE and Netscape I got the URL like this:
http://localhost/cgi-bin/test?rm=update

Which works fine with the rest.

It looks like in Safari the Post form processing is like to just append the hidden value rm=update to the action URI while IE and Netscape would replace the the "rm=login" in the actions URI with "rm=update" which is expected the result.

Any one could advise why Safari does this differently?

Thanks,

Leon
_______________________________________________
web-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development
Do not post admin requests to the list. They will be ignored.




Lucas Holt email@hidden ________________________________________________________ FoolishGames.com (Jewel Fan Site) JustJournal.com (Free blogging) _______________________________________________ web-development mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/web-development Do not post admin requests to the list. They will be ignored.


References: 
 >HTML Form process of POST by Safari (From: Leon Chen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.