Skip to content

Commit

Permalink
fix: do not print the response writer
Browse files Browse the repository at this point in the history
  • Loading branch information
mpl committed Oct 29, 2024
1 parent 615a492 commit 38f2b68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notecard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *server) ServeHTTP(w http.ResponseWriter, req *http.Request) {

if req.Method != http.MethodPost {
w.WriteHeader(http.StatusMethodNotAllowed)
log.Printf("%s: Method not allowed", w)
log.Printf("Method not allowed: %s", req.Method)
return
}

Expand All @@ -63,7 +63,7 @@ func (s *server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
req.Body.Close()

if debug {
log.Printf("notecard request: %s", body)
log.Printf("notecard request: %q", body)
}

s.muCard.Lock()
Expand All @@ -76,7 +76,7 @@ func (s *server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
s.muCard.Unlock()

if debug {
log.Printf("notecard response: %s", note_rsp)
log.Printf("notecard response: %q", note_rsp)
}

// Set the Content-Type header to application/json
Expand Down

0 comments on commit 38f2b68

Please sign in to comment.