[Fixes #160] Added OnResponseCompleted to HttpResponse

This commit is contained in:
Ajay Bhargav Baaskaran 2015-02-19 14:39:21 -08:00
parent 08ddbe8531
commit f63702754f
5 changed files with 18 additions and 0 deletions

View File

@ -111,6 +111,11 @@ namespace Microsoft.AspNet.Http.Core
HttpResponseFeature.OnSendingHeaders(callback, state);
}
public override void OnResponseCompleted(Action<object> callback, object state)
{
HttpResponseFeature.OnResponseCompleted(callback, state);
}
public override void Redirect(string location, bool permanent)
{
if (permanent)

View File

@ -34,5 +34,10 @@ namespace Microsoft.AspNet.Http.Core
{
throw new NotSupportedException();
}
public void OnResponseCompleted(Action<object> callback, object state)
{
throw new NotSupportedException();
}
}
}

View File

@ -15,5 +15,6 @@ namespace Microsoft.AspNet.Http
Stream Body { get; set; }
bool HeadersSent { get; }
void OnSendingHeaders(Action<object> callback, object state);
void OnResponseCompleted(Action<object> callback, object state);
}
}

View File

@ -27,6 +27,8 @@ namespace Microsoft.AspNet.Http
public abstract void OnSendingHeaders(Action<object> callback, object state);
public abstract void OnResponseCompleted(Action<object> callback, object state);
public virtual void Redirect(string location)
{
Redirect(location, permanent: false);

View File

@ -157,6 +157,11 @@ namespace Microsoft.AspNet.Owin
register(callback, state);
}
void IHttpResponseFeature.OnResponseCompleted(Action<object> callback, object state)
{
throw new NotSupportedException();
}
IPAddress IHttpConnectionFeature.RemoteIpAddress
{
get { return IPAddress.Parse(Prop<string>(OwinConstants.CommonKeys.RemoteIpAddress)); }