Changing the BeginFormAntiForgeryPost helper to use Request.Url.AbsolutePath instead Request.RawUrl for the action default (RawUrl give "/default.aspx?" for "/")

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-02-10 11:28:39 -08:00
parent bce5e6ec0e
commit 3dfa3fd6d4

View File

@@ -209,7 +209,7 @@ namespace Orchard.Mvc.Html {
#region BeginFormAntiForgeryPost #region BeginFormAntiForgeryPost
public static MvcForm BeginFormAntiForgeryPost(this HtmlHelper htmlHelper) { public static MvcForm BeginFormAntiForgeryPost(this HtmlHelper htmlHelper) {
return htmlHelper.BeginFormAntiForgeryPost(htmlHelper.ViewContext.HttpContext.Request.RawUrl, FormMethod.Post, new RouteValueDictionary()); return htmlHelper.BeginFormAntiForgeryPost(htmlHelper.ViewContext.HttpContext.Request.Url.AbsolutePath, FormMethod.Post, new RouteValueDictionary());
} }
public static MvcForm BeginFormAntiForgeryPost(this HtmlHelper htmlHelper, string formAction) { public static MvcForm BeginFormAntiForgeryPost(this HtmlHelper htmlHelper, string formAction) {