remove redundant logging

This commit is contained in:
idk
2019-07-09 10:07:41 -04:00
parent a4802884be
commit cfe3878ed8
4 changed files with 6 additions and 12 deletions

View File

@ -165,4 +165,4 @@ opmac32:
ureq:
http_proxy=http://127.0.0.1:7950 \
wget -d --auth-no-challenge --proxy-user user --proxy-password password \
http://inr.i2p -O /dev/null 2>&1 | less -rN
http://i2p-projekt.i2p -O /dev/null 2>&1 | less -rN

View File

@ -27,11 +27,7 @@ func Transfer(destination io.WriteCloser, source io.ReadCloser) {
}
func DelHopHeaders(header http.Header) {
for k, h := range header {
log.Println("HEADER",k, h)
}
for _, h := range hopHeaders {
//log.Println(h)
header.Del(h)
}
if header.Get("User-Agent") != "MYOB/6.66 (AN/ON)" {

View File

@ -2,11 +2,11 @@ package i2pbrowserproxy
import (
"bytes"
"encoding/base64"
"encoding/base64"
"io/ioutil"
"log"
"net/http"
"strings"
"strings"
)
// Create a struct that models the structure of a user, both in the request body, and in the DB
@ -20,7 +20,7 @@ func ProxyBasicAuth(r *http.Request) (username, password string, ok bool) {
if auth == "" {
return
}
return parseBasicAuth(auth)
return parseBasicAuth(auth)
}
func parseBasicAuth(auth string) (username, password string, ok bool) {
@ -56,8 +56,6 @@ func DecodeIdentity(body *http.Request) (*http.Request, *Credentials, error) {
creds.User, creds.Site, ok = ProxyBasicAuth(body)
if ok {
log.Println("OK", creds.User, creds.Site)
} else {
log.Println("NOT OK", creds.User, creds.Site)
}
return req, &creds, nil
}

View File

@ -302,9 +302,9 @@ func (p *SAMMultiProxy) reset(wr http.ResponseWriter, req *http.Request) {
func (p *SAMMultiProxy) get(wr http.ResponseWriter, req *http.Request) {
req.RequestURI = ""
proxycommon.DelHopHeaders(req.Header)
client, req := p.Signin(wr, req)
resp, err := client.client.Do(req)
proxycommon.DelHopHeaders(req.Header)
resp, err := client.client.Do(req)
if err != nil {
msg := "Proxy Error " + err.Error()
if !Quiet {