diff --git a/LICENSE b/LICENSE index dcff33ad..318d18cc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ /* * ISC License * - * Copyright (c) 2018 + * Copyright (c) 2018-2019 * Frank Denis * * Permission to use, copy, modify, and/or distribute this software for any diff --git a/dnscrypt-proxy/local-doh.go b/dnscrypt-proxy/local-doh.go index a0d8e130..4b64b3b1 100644 --- a/dnscrypt-proxy/local-doh.go +++ b/dnscrypt-proxy/local-doh.go @@ -6,6 +6,7 @@ import ( "io/ioutil" "net" "net/http" + "strings" "time" "github.com/jedisct1/dlog" @@ -46,7 +47,9 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht writer.WriteHeader(500) return } + padLen := 127 - (len(response)+127)&127 writer.Header().Set("Content-Type", dataType) + writer.Header().Set("X-Pad", strings.Repeat("X", padLen)) writer.WriteHeader(200) writer.Write(response) }