[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [meek/master] Set "Content-Type: application/octet-stream" in client.
commit 6d129afc9e3db2c40ba3fc27b74ef3c5bbe14935
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Tue Dec 3 22:30:58 2019 -0700
Set "Content-Type: application/octet-stream" in client.
---
meek-client/meek-client.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go
index 18bbff1..f520a60 100644
--- a/meek-client/meek-client.go
+++ b/meek-client/meek-client.go
@@ -132,6 +132,8 @@ func makeRequest(buf []byte, info *RequestInfo) (*http.Request, error) {
body = bytes.NewReader(buf)
}
req, err := http.NewRequest("POST", info.URL.String(), body)
+ // Prevent Content-Type sniffing by net/http and middleboxes.
+ req.Header.Set("Content-Type", "application/octet-stream")
if err != nil {
return nil, err
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits