• Russ Cox's avatar
    net/url: only record RawPath when it is needed · 8e6dc76e
    Russ Cox authored
    RawPath is a hint to the desired encoding of Path.
    It is ignored when it is not a valid encoding of Path,
    such as when Path has been changed but RawPath has not.
    It is not ignored but also not useful when it matches
    the url package's natural choice of encoding.
    In this latter case, set it to the empty string.
    This should help drive home the point that clients
    cannot in general depend on it being present and
    that they should use the EncodedPath method instead.
    
    This also reduces the impact of the change on tests,
    especially tests that use reflect.DeepEqual on parsed URLs.
    
    Change-Id: I437c51a33b85439a31c307caf1436118508ea196
    Reviewed-on: https://go-review.googlesource.com/11760Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    8e6dc76e
Name
Last commit
Last update
..
example_test.go Loading commit data...
url.go Loading commit data...
url_test.go Loading commit data...