Skip to content

net/url: add test of "Windows" file URL #6027

@gopherbot

Description

@gopherbot

by mitchell.hashimoto:

Go version: go version go1.1.1 darwin/amd64

Playground example showcasing bug:
http://play.golang.org/p/XjdafRyjCH

When parsing valid Windows `file:///` URLs, Go prefixes the path with a "/".
While this is easy to workaround, this makes for an invalid path on Windows, such that
the slash must always be eliminated prior to doing any file work.

While the RFC doesn't provide any concrete information on how URLs are formed, Windows
itself predictably handles file URLs in a specific way, and even documented some of the
ways on the official IE blog[1].

[1]: http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions