Skip to content

Commit

Permalink
HTTP server: Use whole URI, including query
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Jun 17, 2018
1 parent 3149db4 commit c700839
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interfacer/src/browsh/raw_text_server.go
Expand Up @@ -53,7 +53,7 @@ type slashFix struct {
// So here is a little hack that simply escapes the entire path portion to make sure it gets
// through the router unchanged.
func (h *slashFix) ServeHTTP(w http.ResponseWriter, r *http.Request) {
r.URL.Path = "/" + url.PathEscape(strings.TrimPrefix(r.URL.Path, "/"))
r.URL.Path = "/" + url.PathEscape(strings.TrimPrefix(r.URL.RequestURI(), "/"))
h.mux.ServeHTTP(w, r)
}

Expand Down

0 comments on commit c700839

Please sign in to comment.