remove debug

This commit is contained in:
xdrm-brackets 2018-04-25 17:28:08 +02:00
parent 5649c49837
commit 4468aa69b6
4 changed files with 8 additions and 23 deletions

View File

@ -48,7 +48,7 @@ func manageClient(sock net.Conn) {
panic(err)
}
fmt.Printf("Upgrade Request: %v\n", req)
fmt.Printf("%v\n", req)
break;
}

View File

@ -37,27 +37,13 @@ func (r *T) parseHeader(b []byte) error {
/* (2) Manage header */
switch head.Name {
case header.HOST: fmt.Printf("[host] ")
err = r.extractHostPort(head.Values)
case header.ORIGIN: fmt.Printf("[origin] ")
err = r.extractOrigin(head.Values)
case header.UPGRADE: fmt.Printf("[upgrade] ")
err = r.checkUpgrade(head.Values)
case header.CONNECTION: fmt.Printf("[connection] ")
err = r.checkConnection(head.Values)
case header.WSVERSION: fmt.Printf("[sec-websocket-version] ")
err = r.checkVersion(head.Values)
case header.WSKEY: fmt.Printf("[sec-websocket-key] ")
err = r.extractKey(head.Values)
case header.WSPROTOCOL: fmt.Printf("[sec-websocket-protocol] ")
err = r.extractProtocols(head.Values)
case header.HOST: err = r.extractHostPort(head.Values)
case header.ORIGIN: err = r.extractOrigin(head.Values)
case header.UPGRADE: err = r.checkUpgrade(head.Values)
case header.CONNECTION: err = r.checkConnection(head.Values)
case header.WSVERSION: err = r.checkVersion(head.Values)
case header.WSKEY: err = r.extractKey(head.Values)
case header.WSPROTOCOL: err = r.extractProtocols(head.Values)
default:
return nil

View File

@ -26,7 +26,6 @@ func Build(r io.Reader) (request *T, err error) {
line, err := cr.Read()
if err == io.EOF {
fmt.Printf("END OF READING\n");
break
}

View File