net/url: add test case to ResolveReference
This adds a test case to resolveReferenceTests to ensure that a
relative path is correctly appended to a base URL that ends with a
trailing slash.
diff --git a/src/net/url/url_test.go b/src/net/url/url_test.go
index d099353..9ba2a12 100644
--- a/src/net/url/url_test.go
+++ b/src/net/url/url_test.go
@@ -1209,6 +1209,7 @@
{"http://foo.com", "bar", "http://foo.com/bar"},
{"http://foo.com/", "bar", "http://foo.com/bar"},
{"http://foo.com/bar/baz", "quux", "http://foo.com/bar/quux"},
+ {"http://foo.com/bar/baz/", "quux", "http://foo.com/bar/baz/quux"},
// ... going up
{"http://foo.com/bar/baz", "../quux", "http://foo.com/quux"},
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Congratulations on opening your first change. Thank you for your contribution!
Next steps:
A maintainer will review your change and provide feedback. See
https://go.dev/doc/contribute#review for more info and tips to get your
patch through code review.
Most changes in the Go project go through a few rounds of revision. This can be
surprising to people new to the project. The careful, iterative review process
is our way of helping mentor contributors and ensuring that their contributions
have a lasting impact.
During May-July and Nov-Jan the Go project is in a code freeze, during which
little code gets reviewed or merged. If a reviewer responds with a comment like
R=go1.11 or adds a tag like "wait-release", it means that this CL will be
reviewed as part of the next development cycle. See https://go.dev/s/release
for more details.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This seems the same as what's on Line 1210
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
This seems the same as what's on Line 1210
It's a bit different, since there are some subtle differences between a path containing no segments and one containing at least one segment. Adding an additional case here seems reasonable enough.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
net/url: add test case to ResolveReference
This adds a test case to resolveReferenceTests to ensure that a
relative path is correctly appended to a base URL that ends with a
trailing slash.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |