React to OnSendingHeaders rename.

This commit is contained in:
Chris R 2015-06-12 15:58:15 -07:00
parent dab08ba7e9
commit e9d406e2f7
1 changed files with 3 additions and 3 deletions

View File

@ -92,10 +92,10 @@ namespace Microsoft.AspNet.Session
_context = context;
_sessionKey = sessionKey;
_options = options;
context.Response.OnSendingHeaders(OnSendingHeadersCallback, state: this);
context.Response.OnResponseStarting(OnResponseStartingCallback, state: this);
}
private static void OnSendingHeadersCallback(object state)
private static void OnResponseStartingCallback(object state)
{
var establisher = (SessionEstablisher)state;
if (establisher._shouldEstablishSession)
@ -131,7 +131,7 @@ namespace Microsoft.AspNet.Session
// Returns true if the session has already been established, or if it still can be because the response has not been sent.
internal bool TryEstablishSession()
{
return (_shouldEstablishSession |= !_context.Response.HeadersSent);
return (_shouldEstablishSession |= !_context.Response.HasStarted);
}
}
}