-
Notifications
You must be signed in to change notification settings - Fork 18k
net/url: give a proper error message on invalid character in scheme #29460
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
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
7990c1f
to
d51a00d
Compare
CLAs look good, thanks! |
This PR (HEAD: d51a00d) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/155922 to see it. Tip: You can toggle comments from me using the |
@agnivade I have made changes based on our discussion in the issue, but at the moment I have one failing test:
Not sure why this is failing since the scheme seems to be fine. Would love to get some pointers on this. |
Please note that the negative tests are not actually testing for the expected error message content, just its mere presence. |
@stefanb still a WIP. Will correct this. |
@agnivade @stefanb in the failing test I mentioned above, it seems like the |
The code can do with some improvement. Your We don't typically discuss CLs in github. Gerrit is the place for that. Please feel free to ping Brad on the CL to get guidance. |
Message from Dmitri Shuralyov: Patch Set 1: Run-TryBot+1 (3 comments) Thanks for sending the change Chandrakant. I've left some initial review comments. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Gobot Gobot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=81fd1e73 Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Gobot Gobot: Patch Set 1: Build is still in progress... Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
This PR (HEAD: 59a4fc2) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/155922 to see it. Tip: You can toggle comments from me using the |
This PR (HEAD: feefe58) has been imported to Gerrit for code review. Please visit https://go-review.googlesource.com/c/go/+/155922 to see it. Tip: You can toggle comments from me using the |
Message from Chandrakant G: Patch Set 5: Any updates on this? Thanks! Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 5:
Just a friendly ping for review. Thanks! Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Brad Fitzpatrick: Patch Set 5:
It was already reviewed. We were waiting on you to update it. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 5:
I have updated the code according to the review from Dmitri - code changes, the PR description and commit messages. The tests also pass. Is there anything else I need to do? Sorry am new to Gerrit, so might have missed something. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Daniel Martí: Patch Set 9: Sorry, I missed this in spring. Perhaps take a look at https://go-review.googlesource.com/c/go/+/185117? That's only updating the issue, not fixing it, but I think it can serve as a base for a much simpler fix. What I meant with my earlier comment is that we shouldn't loop over the url bytes twice. That's a lot of extra code, and it's also inefficient. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
4a7ed1f
to
0f992b9
Compare
Message from Go Bot: Patch Set 1: TryBots beginning. Status page: https://farmer.golang.org/try?commit=81fd1e73 Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Go Bot: Patch Set 1: Build is still in progress... Consult https://build.golang.org/ to see whether it's a new failure. Other builds still in progress; subsequent failure notices suppressed until final report. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 5:
Just a friendly ping for review. Thanks! Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Brad Fitzpatrick: Patch Set 5:
It was already reviewed. We were waiting on you to update it. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 5:
I have updated the code according to the review from Dmitri - code changes, the PR description and commit messages. The tests also pass. Is there anything else I need to do? Sorry am new to Gerrit, so might have missed something. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Dmitri Shuralyov: Patch Set 5: It looks like GerritBot is failing to import the commit message from the PR at #29460 (comment) into this CL for some reason. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Dmitri Shuralyov: Patch Set 5:
Never mind, that's not what's happening. I misread the description because GitHub renders a URL like "#29261" as just "#29261" in its UI. Chandrakant, you'll need to update the description of your PR to say exactly "#29261" rather than the long URL (per https://go-review.googlesource.com/c/go/+/155922/1//COMMIT_MSG#9). Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 7:
It seems like it always shows the long URL no matter how I update it. Are there any other PRs that I can reference to see how its done? Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Dmitri Shuralyov: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Brad Fitzpatrick: Patch Set 8: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Daniel Martí: Patch Set 9: Code-Review-1 (1 comment) I think this could be done in a simpler way, without looping over the input string twice. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 9: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Chandrakant G: Patch Set 9:
Waiting for feedback on my question. Friendly ping - thanks! Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Message from Daniel Martí: Patch Set 9: Sorry, I missed this in spring. Perhaps take a look at https://go-review.googlesource.com/c/go/+/185117? That's only updating the issue, not fixing it, but I think it can serve as a base for a much simpler fix. What I meant with my earlier comment is that we shouldn't loop over the url bytes twice. That's a lot of extra code, and it's also inefficient. Please don’t reply on this GitHub thread. Visit golang.org/cl/155922. |
Fixes #29261