[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [pluggable-transports/meek] branch main updated: Move the error check immediately after http.NewRequest.
This is an automated email from the git hooks/post-receive script.
dcf pushed a commit to branch main
in repository pluggable-transports/meek.
The following commit(s) were added to refs/heads/main by this push:
new e9eff72 Move the error check immediately after http.NewRequest.
e9eff72 is described below
commit e9eff720f50a080d5063f860d98829888fac1fc9
Author: David Fifield <david@xxxxxxxxxxxxxxx>
AuthorDate: Fri Oct 28 00:51:24 2022 -0600
Move the error check immediately after http.NewRequest.
---
meek-client/meek-client.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meek-client/meek-client.go b/meek-client/meek-client.go
index 5cf45eb..8905612 100644
--- a/meek-client/meek-client.go
+++ b/meek-client/meek-client.go
@@ -138,11 +138,11 @@ 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
}
+ // Prevent Content-Type sniffing by net/http and middleboxes.
+ req.Header.Set("Content-Type", "application/octet-stream")
if info.Host != "" {
req.Host = info.Host
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits