Skip to content

net/url: Panic in (nil).ResolveReference(…) #22229

@wking

Description

@wking

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

$ go version
go version go1.7.4 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

This bug is OS-agnostic.

What did you do?

https://play.golang.org/p/grCVrmNOxz

What did you expect to see?

ResolveReference doesn't return an error, so the best we can do is probably return nil if the argument is nil or the argument is relative-enough that we'd need to pull anything off the base object.

What did you see instead?

A panic, but only in cases where the argument is nil, or when the argument is relative-enough that we'd need to pull something of a nil base object.

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