Skip to content

Commit

Permalink
Fix three small bugs in the websocket test server
Browse files Browse the repository at this point in the history
Update main.go
  • Loading branch information
ojarjur authored Jan 19, 2021
2 parents ab755df + 272ee2a commit 2fe1f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions testing/websockets/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
// manually test changes to the code in the agent/websockets package
//
// Example usage:
// go build -o ~/bin/test-websocket-sever testing/websockets/main.go
// go build -o ~/bin/test-websocket-server testing/websockets/main.go
// ~/bin/test-websocket-server --port 8081 --backend http://localhost:8082
package main

Expand Down Expand Up @@ -56,11 +56,11 @@ func main() {
backendProxy := httputil.NewSingleHostReverseProxy(backendURL)
shimmingProxy, err := websockets.Proxy(context.Background(), backendProxy, backendURL.Host, *shimPath, true, func(h http.Handler) http.Handler { return h })
if err != nil {
log.Fatal("Failure starting the websocket-shimming proxy: %v", err)
log.Fatalf("Failure starting the websocket-shimming proxy: %v", err)
}
shimFunc, err := websockets.ShimBody(*shimPath)
if err != nil {
log.Fatal("Failure setting up shim injection code: %v", err)
log.Fatalf("Failure setting up shim injection code: %v", err)
}
backendProxy.ModifyResponse = shimFunc

Expand Down

0 comments on commit 2fe1f2c

Please sign in to comment.