[tor-commits] [pluggable-transports/snowflake] 10/31: Add Detailed Error Output for proxyPolls, proxyAnswers
gitolite role
git at cupani.torproject.org
Thu Jun 16 17:03:57 UTC 2022
This is an automated email from the git hooks/post-receive script.
shelikhoo pushed a commit to branch main
in repository pluggable-transports/snowflake.
commit 50c0d64e108a56dc42623f2c430cda790ed887c6
Author: Shelikhoo <xiaokangwang at outlook.com>
AuthorDate: Mon Apr 11 16:30:45 2022 +0100
Add Detailed Error Output for proxyPolls, proxyAnswers
---
broker/http.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/broker/http.go b/broker/http.go
index 3b0ba1f..2f81f1d 100644
--- a/broker/http.go
+++ b/broker/http.go
@@ -94,7 +94,7 @@ For snowflake proxies to request a client from the Broker.
func proxyPolls(i *IPC, w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit))
if err != nil {
- log.Println("Invalid data.")
+ log.Println("Invalid data.", err.Error())
w.WriteHeader(http.StatusBadRequest)
return
}
@@ -204,7 +204,7 @@ which the broker will pass back to the original client.
func proxyAnswers(i *IPC, w http.ResponseWriter, r *http.Request) {
body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit))
if err != nil {
- log.Println("Invalid data.")
+ log.Println("Invalid data.", err.Error())
w.WriteHeader(http.StatusBadRequest)
return
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tor-commits
mailing list