Hi, although this is not strictly asp.net related, I was hoping that someone
could confirm or debunk what appears to be a major problem with safari
POSTs.
with the following html :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<HTML>
<HEAD>
<base id="BaseTag" href="http://www.mysite.net/"></base>
</HEAD>
<body>
<form name="TheForm" method="post" id="TheForm">
<input type="submit" name="SubmitBtn" value="Submit"
id="SubmitBtn" class="btn" />
</form>
</body>
</html>
note that there is a base tag and no action for the form tag.
regradless of the page/url that this is located at :
http://www.mysite.net/page1.htm
http://www.mysite.net/section1/page1.htm
http://www.mysite.net/section1/page1.htm?x1=x1&x2=2
in safari the post is always to the site root : http://www.mysite.net
in all other browsers ( so far ) the post is to the current url
To work around this I have had to include the following code in the
Application_BeginRequest Method in Global.asax :
if ( Request.Method=="POST" && Request.Path="/Default.htm" )
Response.Redirect(Request.Headers["Referer"]);
this works since POST is not valid for the default root document, in this
case Default.htm
My guess is that safari is incorrectly applying the BASE tag contents to the
missing FORM action rather than just using the current url.
I haven't found any reference to this is bugzilla - has anyone encountered
this issue ?
Thanks
Gerry