Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull #72 broke net/url deserialization. #79

Closed
nicholasknight opened this issue May 13, 2016 · 2 comments
Closed

Pull #72 broke net/url deserialization. #79

nicholasknight opened this issue May 13, 2016 · 2 comments

Comments

@nicholasknight
Copy link

nicholasknight commented May 13, 2016

(I'm sure there's a more general problem than just net/url in here, but I haven't had time to dig down to the root cause, it's just the case that broke in our test suite.)

Consider the sample code at https://gist.github.com/nicholasknight/62fda58c3dc3c27c60209a22a88b44c1

In commit 775d4b0, that code printed:

Original struct: {Scheme:https Opaque: User:<nil> Host:github.com Path:/vmihailenco/msgpack RawPath: RawQuery: Fragment:}
msgpack bytes: ??Scheme?https?Opaque??User??Host?github.com?Path?/vmihailenco/msgpack?RawPath??RawQuery??Fragment?
Deserialized struct: {Scheme:https Opaque: User: Host:github.com Path:/vmihailenco/msgpack RawPath: RawQuery: Fragment:}

But as of commit 2f94887 (pull #72), it prints:

Original struct: {Scheme:https Opaque: User:<nil> Host:github.com Path:/vmihailenco/msgpack RawPath: RawQuery: Fragment:}
msgpack bytes: ??Scheme?https?Opaque??User??Host?github.com?Path?/vmihailenco/msgpack?RawPath??RawQuery??Fragment?
Deserialized struct: {Scheme:https Opaque: User:<nil> Host: Path: RawPath: RawQuery: Fragment:}

Note how only Scheme is filled in, not Host or Path.

I'm assuming it stopped parsing on a nil value but I haven't hunted down the exact cause. If I have time I will, but it might be a couple weeks.

(Edited to make things clearer. I should not file bugs after being up this long.)

@nicholasknight
Copy link
Author

Anyone who looked at this in the ~10 minutes since I filed it should look again, I simplified the test code to just serializing url.URL, making the printouts clearer.

@vmihailenco
Copy link
Owner

vmihailenco commented May 13, 2016

Fixed in v2.5.1. Thanks for the report.

And I am very sorry - it was a serious regression...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants