File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -154,16 +154,16 @@ func (rr *responseRecorder) WriteHeader(statusCode int) {
154
154
// connections by manually setting headers and writing status 101
155
155
rr .statusCode = statusCode
156
156
157
+ // decide whether we should buffer the response
158
+ if rr .shouldBuffer == nil {
159
+ rr .stream = true
160
+ } else {
161
+ rr .stream = ! rr .shouldBuffer (rr .statusCode , rr .ResponseWriterWrapper .Header ())
162
+ }
163
+
157
164
// 1xx responses aren't final; just informational
158
165
if statusCode < 100 || statusCode > 199 {
159
166
rr .wroteHeader = true
160
-
161
- // decide whether we should buffer the response
162
- if rr .shouldBuffer == nil {
163
- rr .stream = true
164
- } else {
165
- rr .stream = ! rr .shouldBuffer (rr .statusCode , rr .ResponseWriterWrapper .Header ())
166
- }
167
167
}
168
168
169
169
// if informational or not buffered, immediately write header
You can’t perform that action at this time.
0 commit comments