[PATCH] D112751: [llvm] [Support] Add HTTP Client Support library.
Noah Shutty via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 29 14:12:39 PST 2021
noajshu added inline comments.
================
Comment at: llvm/unittests/Support/HTTPClient.cpp:75
+
+ EXPECT_THAT_ERROR(Handler.handleHeaderLine("Content-Length: \0\0\0"),
+ Succeeded());
----------------
dblaikie wrote:
> This probably doesn't test what it's intended to test - the string will terminate at the first '\0' - if you want to test embedded null characters, you'd need to specify an explicit length when creating the StringRef explicitly, rather than relying on StringRef(const char*) conversion.
Thanks for pointing this out! I have added a fix using C++14 string literals. If you prefer I can also change this to use a hardcoded string length instead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112751/new/
https://reviews.llvm.org/D112751
More information about the llvm-commits
mailing list