| 1 | // Copyright 2015 Matthew Holt and The Caddy Authors |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package fastcgiscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/ |
| 16 | |
| 17 | import ( |
| 18 | "bytesscip-go gomod github.com/golang/go/src go1.25.1 bytes/" |
| 19 | "encoding/binaryscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/" |
| 20 | ) |
| 21 | |
| 22 | // streamWriter abstracts out the separation of a stream into discrete records. |
| 23 | // It only writes maxWrite bytes at a time. |
| 24 | type streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter# struct { |
| 25 | cscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#c. *clientscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/client# |
| 26 | hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h. headerscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header# |
| 27 | bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf. *bytesscip-go gomod github.com/golang/go/src go1.25.1 bytes/.Bufferscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer# |
| 28 | recTypescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#recType. uint8 |
| 29 | } |
| 30 | |
| 31 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) writeRecordscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeRecord().(recType uint8, content []byte) (err error) { |
| 32 | w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..initscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#init().(recType, w.cscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#c..reqIDscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/client#reqID., len(content)) |
| 33 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(padscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/pad.[:8]) |
| 34 | w.writeHeaderscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeHeader().() |
| 35 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(content) |
| 36 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(padscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/pad.[:w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..PaddingLengthscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#PaddingLength.]) |
| 37 | _, err = w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..WriteToscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#WriteTo().(w.cscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#c..rwcscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/client#rwc.) |
| 38 | return err |
| 39 | } |
| 40 | |
| 41 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) writeBeginRequestscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeBeginRequest().(role uint16, flags uint8) error { |
| 42 | b := [8]byte{byte(role >> 8), byte(role), flags} |
| 43 | return w.writeRecordscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeRecord().(BeginRequestscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/BeginRequest., b[:]) |
| 44 | } |
| 45 | |
| 46 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) Writescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#Write().(p []byte) (int, error) { |
| 47 | // init header |
| 48 | if w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Lenscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Len().() < 8 { |
| 49 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(padscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/pad.[:8]) |
| 50 | } |
| 51 | |
| 52 | nn := 0 |
| 53 | for len(p) > 0 { |
| 54 | n := len(p) |
| 55 | nl := maxWritescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/maxWrite. + 8 - w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Lenscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Len().() |
| 56 | if n > nl { |
| 57 | n = nl |
| 58 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(p[:n]) |
| 59 | if err := w.Flushscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#Flush().(); err != nil { |
| 60 | return nn, err |
| 61 | } |
| 62 | // reset headers |
| 63 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(padscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/pad.[:8]) |
| 64 | } else { |
| 65 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(p[:n]) |
| 66 | } |
| 67 | nn += n |
| 68 | p = p[n:] |
| 69 | } |
| 70 | return nn, nil |
| 71 | } |
| 72 | |
| 73 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) endStreamscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#endStream().() error { |
| 74 | // send empty record to close the stream |
| 75 | return w.writeRecordscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeRecord().(w.recTypescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#recType., nil) |
| 76 | } |
| 77 | |
| 78 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) writePairsscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writePairs().(pairs map[string]string) error { |
| 79 | b := make([]byte, 8) |
| 80 | nn := 0 |
| 81 | // init headers |
| 82 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(b) |
| 83 | for k, v := range pairs { |
| 84 | m := 8 + len(k) + len(v) |
| 85 | if m > maxWritescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/maxWrite. { |
| 86 | // param data size exceed 65535 bytes" |
| 87 | vl := maxWritescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/maxWrite. - 8 - len(k) |
| 88 | v = v[:vl] |
| 89 | } |
| 90 | n := encodeSizescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/encodeSize().(b, uint32(len(k))) |
| 91 | n += encodeSizescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/encodeSize().(b[n:], uint32(len(v))) |
| 92 | m = n + len(k) + len(v) |
| 93 | if (nn + m) > maxWritescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/maxWrite. { |
| 94 | if err := w.Flushscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#Flush().(); err != nil { |
| 95 | return err |
| 96 | } |
| 97 | // reset headers |
| 98 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(b) |
| 99 | nn = 0 |
| 100 | } |
| 101 | nn += m |
| 102 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(b[:n]) |
| 103 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..WriteStringscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#WriteString().(k) |
| 104 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..WriteStringscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#WriteString().(v) |
| 105 | } |
| 106 | return w.FlushStreamscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#FlushStream().() |
| 107 | } |
| 108 | |
| 109 | func encodeSizescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/encodeSize().(b []byte, size uint32) int { |
| 110 | if size > 127 { |
| 111 | size |= 1 << 31 |
| 112 | binaryscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/.BigEndianscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/BigEndian..PutUint32scip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/bigEndian#PutUint32().(b, size) |
| 113 | return 4 |
| 114 | } |
| 115 | b[0] = byte(size) //nolint:gosec // false positive; b is made 8 bytes long, then this function is always called with b being at least 4 or 1 byte long |
| 116 | return 1 |
| 117 | } |
| 118 | |
| 119 | // writeHeader populate header wire data in buf, it abuses buffer.Bytes() modification |
| 120 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) writeHeaderscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeHeader().() { |
| 121 | h := w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Bytesscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Bytes().()[:8] |
| 122 | h[0] = w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..Versionscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#Version. |
| 123 | h[1] = w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..Typescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#Type. |
| 124 | binaryscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/.BigEndianscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/BigEndian..PutUint16scip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/bigEndian#PutUint16().(h[2:4], w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..IDscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#ID.) |
| 125 | binaryscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/.BigEndianscip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/BigEndian..PutUint16scip-go gomod github.com/golang/go/src go1.25.1 `encoding/binary`/bigEndian#PutUint16().(h[4:6], w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..ContentLengthscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#ContentLength.) |
| 126 | h[6] = w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..PaddingLengthscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#PaddingLength. |
| 127 | h[7] = w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..Reservedscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#Reserved. |
| 128 | } |
| 129 | |
| 130 | // Flush write buffer data to the underlying connection, it assumes header data is the first 8 bytes of buf |
| 131 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) Flushscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#Flush().() error { |
| 132 | w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..initscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#init().(w.recTypescip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#recType., w.cscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#c..reqIDscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/client#reqID., w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Lenscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Len().()-8) |
| 133 | w.writeHeaderscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#writeHeader().() |
| 134 | w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..Writescip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#Write().(padscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/pad.[:w.hscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#h..PaddingLengthscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/header#PaddingLength.]) |
| 135 | _, err := w.bufscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#buf..WriteToscip-go gomod github.com/golang/go/src go1.25.1 bytes/Buffer#WriteTo().(w.cscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#c..rwcscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/client#rwc.) |
| 136 | return err |
| 137 | } |
| 138 | |
| 139 | // FlushStream flush data then end current stream |
| 140 | func (w *streamWriterscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#) FlushStreamscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#FlushStream().() error { |
| 141 | if err := w.Flushscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#Flush().(); err != nil { |
| 142 | return err |
| 143 | } |
| 144 | return w.endStreamscip-go gomod github.com/caddyserver/caddy/v2 . `github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/fastcgi`/streamWriter#endStream().() |
| 145 | } |