Tracking adapter may try to set cookie when response headers already sent

Found in

EPiServer.Commerce 11.3.0

Created

Nov 09 2017

Updated

Nov 10 2017

Fixed in

EPiServer.Commerce 11.4.0

Area

Core

State

Closed, Fixed and tested

Voting

Affected? You can raise the priority of a bug by voting for it. By doing so, you will be helping our developers to choose which bug to fix next.

Voting is disabled for closed bugs.

0

Description

When a response is returned from the Personalization service, the Commerce integration will pick up the assigned session id and cuid and try to persist those in a cookie on the response to the website client. However, this causes problems in some scenarios. This exception has been observed:

System.Web.HttpException: Server cannot modify cookies after HTTP headers have been sent.

The code should try to avoid this exception by checking if the headers have already been sent before trying to set the cookie.

Comments