Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Commit a79b05b

Browse files
committed
#320 Rename OnSendingHeaders to OnResponseStarting and HeadersSent to HasStarted.
1 parent 40cfc23 commit a79b05b

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

src/Microsoft.AspNet.Http.Abstractions/HttpResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public abstract class HttpResponse
2222

2323
public abstract IResponseCookies Cookies { get; }
2424

25-
public abstract bool HeadersSent { get; }
25+
public abstract bool HasStarted { get; }
2626

27-
public abstract void OnSendingHeaders(Action<object> callback, object state);
27+
public abstract void OnResponseStarting(Action<object> callback, object state);
2828

2929
public abstract void OnResponseCompleted(Action<object> callback, object state);
3030

src/Microsoft.AspNet.Http.Features/IHttpResponseFeature.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ public interface IHttpResponseFeature
1313
string ReasonPhrase { get; set; }
1414
IDictionary<string, string[]> Headers { get; set; }
1515
Stream Body { get; set; }
16-
bool HeadersSent { get; }
17-
void OnSendingHeaders(Action<object> callback, object state);
16+
bool HasStarted { get; }
17+
void OnResponseStarting(Action<object> callback, object state);
1818
void OnResponseCompleted(Action<object> callback, object state);
1919
}
2020
}

src/Microsoft.AspNet.Http/DefaultHttpResponse.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ public override IResponseCookies Cookies
8989
get { return ResponseCookiesFeature.Cookies; }
9090
}
9191

92-
public override bool HeadersSent
92+
public override bool HasStarted
9393
{
94-
get { return HttpResponseFeature.HeadersSent; }
94+
get { return HttpResponseFeature.HasStarted; }
9595
}
9696

97-
public override void OnSendingHeaders(Action<object> callback, object state)
97+
public override void OnResponseStarting(Action<object> callback, object state)
9898
{
99-
HttpResponseFeature.OnSendingHeaders(callback, state);
99+
HttpResponseFeature.OnResponseStarting(callback, state);
100100
}
101101

102102
public override void OnResponseCompleted(Action<object> callback, object state)

src/Microsoft.AspNet.Http/Features/HttpResponseFeature.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ public HttpResponseFeature()
2424

2525
public Stream Body { get; set; }
2626

27-
public bool HeadersSent
27+
public bool HasStarted
2828
{
2929
get { return false; }
3030
}
3131

32-
public void OnSendingHeaders(Action<object> callback, object state)
32+
public void OnResponseStarting(Action<object> callback, object state)
3333
{
3434
throw new NotSupportedException();
3535
}

src/Microsoft.AspNet.Owin/OwinEnvironment.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public OwinEnvironment(HttpContext context)
6161
{ OwinConstants.ResponseReasonPhrase, new FeatureMap<IHttpResponseFeature>(feature => feature.ReasonPhrase, (feature, value) => feature.ReasonPhrase = Convert.ToString(value)) },
6262
{ OwinConstants.ResponseHeaders, new FeatureMap<IHttpResponseFeature>(feature => feature.Headers, (feature, value) => feature.Headers = (IDictionary<string, string[]>)value) },
6363
{ OwinConstants.ResponseBody, new FeatureMap<IHttpResponseFeature>(feature => feature.Body, () => Stream.Null, (feature, value) => feature.Body = (Stream)value) },
64-
{ OwinConstants.CommonKeys.OnSendingHeaders, new FeatureMap<IHttpResponseFeature>(feature => new Action<Action<object>, object>(feature.OnSendingHeaders)) },
64+
{ OwinConstants.CommonKeys.OnSendingHeaders, new FeatureMap<IHttpResponseFeature>(feature => new Action<Action<object>, object>(feature.OnResponseStarting)) },
6565

6666
{ OwinConstants.CommonKeys.LocalPort, new FeatureMap<IHttpConnectionFeature>(feature => feature.LocalPort.ToString(CultureInfo.InvariantCulture),
6767
(feature, value) => feature.LocalPort = Convert.ToInt32(value, CultureInfo.InvariantCulture)) },

src/Microsoft.AspNet.Owin/OwinFeatureCollection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ Stream IHttpResponseFeature.Body
142142
set { Prop(OwinConstants.ResponseBody, value); }
143143
}
144144

145-
bool IHttpResponseFeature.HeadersSent
145+
bool IHttpResponseFeature.HasStarted
146146
{
147147
get { return _headersSent; }
148148
}
149149

150-
void IHttpResponseFeature.OnSendingHeaders(Action<object> callback, object state)
150+
void IHttpResponseFeature.OnResponseStarting(Action<object> callback, object state)
151151
{
152152
var register = Prop<Action<Action<object>, object>>(OwinConstants.CommonKeys.OnSendingHeaders);
153153
if (register == null)

0 commit comments

Comments
 (0)