Skip to content

Commit ef5bde3

Browse files
committed
Merge branch 'master' of github.com:jedisct1/dnscrypt-proxy
2 parents 941cd63 + 21c63a5 commit ef5bde3

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* ISC License
33
*
4-
* Copyright (c) 2018
4+
* Copyright (c) 2018-2019
55
* Frank Denis <j at pureftpd dot org>
66
*
77
* Permission to use, copy, modify, and/or distribute this software for any

dnscrypt-proxy/local-doh.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"io/ioutil"
77
"net"
88
"net/http"
9+
"strings"
910
"time"
1011

1112
"github.com/jedisct1/dlog"
@@ -46,7 +47,9 @@ func (handler localDoHHandler) ServeHTTP(writer http.ResponseWriter, request *ht
4647
writer.WriteHeader(500)
4748
return
4849
}
50+
padLen := 127 - (len(response)+127)&127
4951
writer.Header().Set("Content-Type", dataType)
52+
writer.Header().Set("X-Pad", strings.Repeat("X", padLen))
5053
writer.WriteHeader(200)
5154
writer.Write(response)
5255
}

0 commit comments

Comments
 (0)