diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a29bc8..463ffb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ The format is based on [Keep a Changelog], and this project adheres to [keep a changelog]: https://keepachangelog.com/en/1.0.0/ [semantic versioning]: https://semver.org/spec/v2.0.0.html +## Unreleased + +### Fixed + +- Fix rendering of the HTTP request line to match RFC-2616 + ## [0.3.3] - 2022-07-11 ### Fixed diff --git a/cmd/echo-server/main.go b/cmd/echo-server/main.go index 2da1516..7d73819 100644 --- a/cmd/echo-server/main.go +++ b/cmd/echo-server/main.go @@ -251,7 +251,7 @@ func writeSSEField( // writeRequest writes request headers to w. func writeRequest(w io.Writer, req *http.Request) { - fmt.Fprintf(w, "%s %s %s\n", req.Proto, req.Method, req.URL) + fmt.Fprintf(w, "%s %s %s\n", req.Method, req.URL, req.Proto) fmt.Fprintln(w, "") fmt.Fprintf(w, "Host: %s\n", req.Host)