fix SetStatusCodeAndDisposeAsync(HttpStatusCode.NotModified) breaking
This commit is contained in:
@@ -52,10 +52,12 @@ public class RequestContext : IDisposable {
|
||||
public async Task SetStatusCodeAndDisposeAsync(HttpStatusCode status) {
|
||||
using (this) {
|
||||
SetStatusCode((int) status);
|
||||
if (status != HttpStatusCode.NotModified) { // NotModified must not write any data to response
|
||||
await WriteToRespAsync("\n\n");
|
||||
await RespWriter.FlushAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public async Task SetStatusCodeAndDisposeAsync(int status, string description) {
|
||||
|
||||
Reference in New Issue
Block a user