Julio Guerra
4ea7d51dea
Avoid overwriting the written status code
...
When the response has been written, the status code saved in `responseWriter`
should no longer be changed by subsequent calls to `WriteHeader()`.
This fixes for example the logging possibly showing the wrong status code, or
any other middleware function checking the status code.
2021-02-03 23:35:39 +01:00
John Bampton
beb879e475
Change Writter to Writer. ( #2079 )
2019-09-30 14:22:12 +08:00
Dmitry Kutakov
b056a34bdc
fix errcheck warnings ( #1739 )
2019-01-18 09:32:53 +08:00
田欧
f45c928a15
chore: use http.Status* instead of hard code ( #1482 )
2018-08-14 09:51:56 +08:00
zhanweidu
0552c3bc3a
flush operation will overwrite the origin status code ( #1460 )
...
The status of responseWriter will be overwrite if flush was called. This is caused by the Flush of http.response.Flush().
2018-08-07 12:41:28 +08:00
vz
d17a12591f
update assert param(expect, actual) position ( #1421 )
...
- update assert param(expect, actual) position
2018-07-03 15:39:18 +08:00
Eason Lin
81007d2ce0
refactor(test): unify assert.Equal usage ( #1054 )
2017-08-04 13:45:59 +08:00
Manu Mtz-Almeida
0cb52ccef7
Improves unit test coverage
2015-05-19 02:29:32 +02:00
Manu Mtz-Almeida
0a192fb0fa
Tons of unit tests
2015-04-09 12:15:02 +02:00
Manu Mtz-Almeida
c61c547539
More unit tests for ResponseWriter
2015-04-08 15:20:39 +02:00
Manu Mtz-Almeida
4d315f474b
More unit tests
2015-04-08 14:24:49 +02:00