mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 13:43:47 +03:00
headers: Support repeated WriteHeader if 1xx (fix #5074)
This commit is contained in:
parent
eead00f54a
commit
7041970059
1 changed files with 4 additions and 1 deletions
|
@ -332,7 +332,10 @@ func (rww *responseWriterWrapper) WriteHeader(status int) {
|
|||
if rww.wroteHeader {
|
||||
return
|
||||
}
|
||||
rww.wroteHeader = true
|
||||
// 1xx responses aren't final; just informational
|
||||
if status < 100 || status > 199 {
|
||||
rww.wroteHeader = true
|
||||
}
|
||||
if rww.require == nil || rww.require.Match(status, rww.ResponseWriterWrapper.Header()) {
|
||||
if rww.headerOps != nil {
|
||||
rww.headerOps.ApplyTo(rww.ResponseWriterWrapper.Header(), rww.replacer)
|
||||
|
|
Loading…
Reference in a new issue