mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Add Detailed Error Output for proxyPolls, proxyAnswers
This commit is contained in:
parent
c7549d886e
commit
50c0d64e10
1 changed files with 2 additions and 2 deletions
|
@ -94,7 +94,7 @@ For snowflake proxies to request a client from the Broker.
|
||||||
func proxyPolls(i *IPC, w http.ResponseWriter, r *http.Request) {
|
func proxyPolls(i *IPC, w http.ResponseWriter, r *http.Request) {
|
||||||
body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit))
|
body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Invalid data.")
|
log.Println("Invalid data.", err.Error())
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
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) {
|
func proxyAnswers(i *IPC, w http.ResponseWriter, r *http.Request) {
|
||||||
body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit))
|
body, err := ioutil.ReadAll(http.MaxBytesReader(w, r.Body, readLimit))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Invalid data.")
|
log.Println("Invalid data.", err.Error())
|
||||||
w.WriteHeader(http.StatusBadRequest)
|
w.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue