From 80e39f5ed37db5996c9997acebb24d829550031e Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 14 Apr 2020 18:40:37 +0700 Subject: [PATCH 1/3] log requests in the interop server --- interop/http09/server.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interop/http09/server.go b/interop/http09/server.go index 99e653798..893fdbb00 100644 --- a/interop/http09/server.go +++ b/interop/http09/server.go @@ -95,7 +95,7 @@ func (s *Server) handleConn(sess quic.Session) { } go func() { if err := s.handleStream(str); err != nil { - log.Printf("Handling stream failed: %s", err.Error()) + log.Printf("Handling stream failed: %s\n", err.Error()) } }() } @@ -109,6 +109,9 @@ func (s *Server) handleStream(str quic.Stream) error { request := string(reqBytes) request = strings.TrimRight(request, "\r\n") request = strings.TrimRight(request, " ") + + log.Printf("Received request: %s\n", request) + if request[:5] != "GET /" { str.CancelWrite(42) return nil From 7b126285ab54a8f4c551b5de39294f3cfe4d209e Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 14 Apr 2020 18:42:24 +0700 Subject: [PATCH 2/3] log creation of qlog files in interop client and server --- interop/utils/logging.go | 1 + 1 file changed, 1 insertion(+) diff --git a/interop/utils/logging.go b/interop/utils/logging.go index 17ca742ef..0c23f154c 100644 --- a/interop/utils/logging.go +++ b/interop/utils/logging.go @@ -42,6 +42,7 @@ func GetQLOGWriter() (func(connID []byte) io.WriteCloser, error) { log.Printf("Failed to create qlog file %s: %s", path, err.Error()) return nil } + log.Printf("Created qlog file: %s\n", path) return utils.NewBufferedWriteCloser(bufio.NewWriter(f), f) }, nil } From fe313fb83f22e7c2ced495d42ac4f6ec79d9741b Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 14 Apr 2020 18:50:13 +0700 Subject: [PATCH 3/3] log requests in the interop client --- interop/http09/client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interop/http09/client.go b/interop/http09/client.go index 6c1c53c9d..14f45d3e0 100644 --- a/interop/http09/client.go +++ b/interop/http09/client.go @@ -5,6 +5,7 @@ import ( "crypto/tls" "errors" "io/ioutil" + "log" "net" "net/http" "strings" @@ -38,6 +39,8 @@ func (r *RoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { return nil, errors.New("only GET requests supported") } + log.Printf("Requesting %s.\n", req.URL) + r.mutex.Lock() hostname := authorityAddr("https", hostnameFromRequest(req)) if r.clients == nil {