diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-16 23:05:44 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-16 23:05:44 +0000 |
commit | 31c6ec422702226aabab7d082da16663e6c3e72c (patch) | |
tree | 44176975832a3faf1626836e70c97d5edd674122 /libgo/go/websocket/client.go | |
parent | b3145af52cfb7c84d62a8e4ceeb165a7369718da (diff) | |
download | gcc-31c6ec422702226aabab7d082da16663e6c3e72c.tar.gz |
Update to current version of Go library (revision 94d654be2064).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/websocket/client.go')
-rw-r--r-- | libgo/go/websocket/client.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libgo/go/websocket/client.go b/libgo/go/websocket/client.go index 09134594405..d8a7aa0a266 100644 --- a/libgo/go/websocket/client.go +++ b/libgo/go/websocket/client.go @@ -245,20 +245,20 @@ func handshake(resourceName, host, origin, location, protocol string, br *bufio. } // Step 41. check websocket headers. - if resp.Header["Upgrade"] != "WebSocket" || - strings.ToLower(resp.Header["Connection"]) != "upgrade" { + if resp.Header.Get("Upgrade") != "WebSocket" || + strings.ToLower(resp.Header.Get("Connection")) != "upgrade" { return ErrBadUpgrade } - if resp.Header["Sec-Websocket-Origin"] != origin { + if resp.Header.Get("Sec-Websocket-Origin") != origin { return ErrBadWebSocketOrigin } - if resp.Header["Sec-Websocket-Location"] != location { + if resp.Header.Get("Sec-Websocket-Location") != location { return ErrBadWebSocketLocation } - if protocol != "" && resp.Header["Sec-Websocket-Protocol"] != protocol { + if protocol != "" && resp.Header.Get("Sec-Websocket-Protocol") != protocol { return ErrBadWebSocketProtocol } @@ -304,17 +304,17 @@ func draft75handshake(resourceName, host, origin, location, protocol string, br if resp.Status != "101 Web Socket Protocol Handshake" { return ErrBadStatus } - if resp.Header["Upgrade"] != "WebSocket" || - resp.Header["Connection"] != "Upgrade" { + if resp.Header.Get("Upgrade") != "WebSocket" || + resp.Header.Get("Connection") != "Upgrade" { return ErrBadUpgrade } - if resp.Header["Websocket-Origin"] != origin { + if resp.Header.Get("Websocket-Origin") != origin { return ErrBadWebSocketOrigin } - if resp.Header["Websocket-Location"] != location { + if resp.Header.Get("Websocket-Location") != location { return ErrBadWebSocketLocation } - if protocol != "" && resp.Header["Websocket-Protocol"] != protocol { + if protocol != "" && resp.Header.Get("Websocket-Protocol") != protocol { return ErrBadWebSocketProtocol } return |