[Webkit-unassigned] [Bug 228122] Add functionalities for parsing URL query string

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 3 20:13:19 PDT 2021


--- Comment #39 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 434864
  --> https://bugs.webkit.org/attachment.cgi?id=434864

View in context: https://bugs.webkit.org/attachment.cgi?id=434864&action=review

Some post-commit feedback:

> Source/WTF/wtf/URL.cpp:1225
> +static StringView substringIgnoringQueryAndFragments(const URL& url)

Could you move this to be a lambda inside isEqualIgnoringQueryAndFragments?  It's only used in that scope.

> Source/WTF/wtf/URL.h:248
> +WTF_EXPORT_PRIVATE bool isEqualIgnoringQueryAndFragments(const URL&, const URL&);

I think this should either be renamed to areEqualIgnoringQueriesAndFragments or it should be made a member of the URL class.
bool equalsIgnoringQueryAndFragment(const URL&) const;

> Source/WTF/wtf/URL.h:249
> +WTF_EXPORT_PRIVATE void removeQueryParameters(URL&, const HashSet<String>&);

Could you add another important test case to verify that we don't regress behavior in the future?
Make a URL from "https://example.com/?%C3%A4=value"
See how removing "%C3%A4" changes the URL.
See how removing "ä" changes the URL.

I think rather than passing a non-const URL as a parameter, this should be a member of the URL class.
void removeQueryParametersWithKeys(const HashSet<String>& keys);

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210804/74b52f41/attachment-0001.htm>

More information about the webkit-unassigned mailing list