Skip to content

http: URLs with RawPath domain.com?query #2344

@bradfitz

Description

@bradfitz
http://google.com?q=ponies works in Chrome and Firefox.

url.Parse parses it as:

Hello, &url.URL{Raw:"http://google.com?q=ponies";, Scheme:"http",
RawAuthority:"google.com", RawUserinfo:"",
Host:"google.com", RawPath:"?q=ponies", Path:"",
OpaquePath:false, RawQuery:"q=ponies", Fragment:""}

Which I guess is correct, but the RawPath at least generates illegal Request.Write
headers:

GET ?q=ponies HTTP/1.1

Figure out the best fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions