Skip to content

Commit

Permalink
Fix rendering of the HTTP request line to match RFC-2616.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalloc committed Dec 22, 2022
1 parent 695e6e6 commit e6abc18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/echo-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e6abc18

Please sign in to comment.