We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 956d015 commit 62abc7aCopy full SHA for 62abc7a
src/url-setters.cpp
@@ -50,9 +50,12 @@ namespace ada {
50
void url::set_search(const std::string_view input) {
51
if (input.empty()) {
52
query = std::nullopt;
53
- // Empty this’s query object’s list.
54
- // @todo Implement this if/when we have URLSearchParams.
55
- // Potentially strip trailing spaces from an opaque path with this.
+ if (has_opaque_path) {
+ size_t non_whitespace_location = path.find_first_of(' ');
+ if (non_whitespace_location != std::string_view::npos) {
56
+ path = path.substr(0, non_whitespace_location);
57
+ }
58
59
return;
60
}
61
0 commit comments