Skip to content

Commit 7b44b30

Browse files
committed
Fixes "Server cannot modify cookies after HTTP headers have been sent".
A child-action should never have a post-action of the same name.
1 parent ad0159d commit 7b44b30

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
* Switching the language always redirected to the home page if SEO friendly URLs was deactivated.
3737
* File upload of a checkout attribute was not stored on cart page.
3838
* Redirecting within checkout may have displayed an incorrect URL in the browser.
39+
* Server cannot modify cookies after HTTP headers have been sent.
3940

4041

4142
## SmartStore.NET 3.1.5

src/Presentation/SmartStore.Web/Controllers/CommonController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ public ActionResult CookieConsentBadge()
855855
}
856856

857857
[HttpPost]
858-
public ActionResult CookieConsentBadge(CookieConsentModel model)
858+
public ActionResult SetCookieConsentBadge(CookieConsentModel model)
859859
{
860860
CookieConsent.SetCookieConsent(Response, true);
861861

src/Presentation/SmartStore.Web/Views/Common/Partials/CookieConsentBadge.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Layout = "";
44
}
55

6-
@using (Ajax.BeginForm("CookieConsentBadge", "Common", null, new AjaxOptions()
6+
@using (Ajax.BeginForm("SetCookieConsentBadge", "Common", null, new AjaxOptions()
77
{
88
HttpMethod = "POST",
99
OnComplete = "OnConsented"

0 commit comments

Comments
 (0)