remove redundant logging
This commit is contained in:
2
Makefile
2
Makefile
@ -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
|
||||
|
@ -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)" {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user