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

Update httpHeaderNameString() to return an ASCIILiteral #14360

Merged
merged 1 commit into from
May 26, 2023

Conversation

cdumez
Copy link
Contributor

@cdumez cdumez commented May 25, 2023

fa60194

Update httpHeaderNameString() to return an ASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=257343

Reviewed by Youenn Fablet.

Update httpHeaderNameString() to return an ASCIILiteral instead of a StringView.
It makes it clearer that it only returns ASCII characters and that they are
"immortal".

* Source/WTF/wtf/text/StringHash.h:
(WTF::HashTranslatorASCIILiteral::hash):
(WTF::HashTranslatorASCIILiteral::equal):
(WTF::HashTranslatorASCIILiteral::translate):
(WTF::HashTranslatorASCIILiteralCaseInsensitive::hash):
(WTF::HashTranslatorASCIILiteralCaseInsensitive::equal):
* Source/WTF/wtf/text/WTFString.h:
(WTF::HashTranslatorASCIILiteral::hash): Deleted.
(WTF::HashTranslatorASCIILiteral::equal): Deleted.
(WTF::HashTranslatorASCIILiteral::translate): Deleted.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* Source/WebCore/platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::updateKeyValue):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::isCrossOriginSafeHeader):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
* Source/WebCore/platform/network/create-http-header-name-table:

Canonical link: https://commits.webkit.org/264587@main

a1e3bc6

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 ❌ πŸ§ͺ gtk-wk2
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ›  jsc-mips
βœ… πŸ›  watch-sim βœ… πŸ§ͺ jsc-mips-tests

@cdumez cdumez requested a review from philn as a code owner May 25, 2023 19:35
@cdumez cdumez self-assigned this May 25, 2023
@cdumez cdumez added the WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit). label May 25, 2023
@cdumez cdumez force-pushed the 257343_httpHeaderNameString branch from 9d6ea2a to 90e098d Compare May 25, 2023 20:23
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 25, 2023
@cdumez cdumez removed the merging-blocked Applied to prevent a change from being merged label May 25, 2023
@cdumez cdumez force-pushed the 257343_httpHeaderNameString branch from 90e098d to a1e3bc6 Compare May 25, 2023 22:25
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 26, 2023
@cdumez cdumez removed the merging-blocked Applied to prevent a change from being merged label May 26, 2023
@cdumez cdumez added the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
https://bugs.webkit.org/show_bug.cgi?id=257343

Reviewed by Youenn Fablet.

Update httpHeaderNameString() to return an ASCIILiteral instead of a StringView.
It makes it clearer that it only returns ASCII characters and that they are
"immortal".

* Source/WTF/wtf/text/StringHash.h:
(WTF::HashTranslatorASCIILiteral::hash):
(WTF::HashTranslatorASCIILiteral::equal):
(WTF::HashTranslatorASCIILiteral::translate):
(WTF::HashTranslatorASCIILiteralCaseInsensitive::hash):
(WTF::HashTranslatorASCIILiteralCaseInsensitive::equal):
* Source/WTF/wtf/text/WTFString.h:
(WTF::HashTranslatorASCIILiteral::hash): Deleted.
(WTF::HashTranslatorASCIILiteral::equal): Deleted.
(WTF::HashTranslatorASCIILiteral::translate): Deleted.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
* Source/WebCore/platform/network/HTTPHeaderMap.h:
(WebCore::HTTPHeaderMap::HTTPHeaderMapConstIterator::updateKeyValue):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::isCrossOriginSafeHeader):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
* Source/WebCore/platform/network/create-http-header-name-table:

Canonical link: https://commits.webkit.org/264587@main
@webkit-commit-queue
Copy link
Collaborator

Committed 264587@main (fa60194): https://commits.webkit.org/264587@main

Reviewed commits have been landed. Closing PR #14360 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit fa60194 into WebKit:main May 26, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebCore Misc. For miscellaneous bugs in the WebCore framework (and not JavaScriptCore or WebKit).
Projects
None yet
5 participants