Skip to content

Commit cf1498c

Browse files
committed
Properly compute the padding length for local DoH
Fixes #1173
1 parent d14d2b6 commit cf1498c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dnscrypt-proxy/local-doh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht
5959
}
6060
responseLen := len(response)
6161
paddedLen := dohPaddedLen(responseLen)
62-
padLen := responseLen - paddedLen
62+
padLen := paddedLen - responseLen
6363
paddedResponse, err := addEDNS0PaddingIfNoneFound(&msg, response, padLen)
6464
if err != nil {
6565
return

0 commit comments

Comments
 (0)