mirror of
https://github.com/m13253/dns-over-https.git
synced 2026-03-30 14:15:40 +00:00
Fix HTTP stream leaking problem
This commit is contained in:
@@ -224,6 +224,7 @@ func (c *Client) handlerFunc(w dns.ResponseWriter, r *dns.Msg, isTCP bool) {
|
||||
}
|
||||
|
||||
if req.response != nil {
|
||||
defer req.response.Body.Close()
|
||||
for _, header := range c.conf.DebugHTTPHeaders {
|
||||
if value := req.response.Header.Get(header); value != "" {
|
||||
log.Printf("%s: %s\n", header, value)
|
||||
|
||||
Reference in New Issue
Block a user