[webkit-reviews] review denied: [Bug 215379] Implement HTTPServer for API tests in c++ : [Attachment 436271] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 24 09:21:50 PDT 2021
Alex Christensen <achristensen at apple.com> has denied Takashi Komori
<takashi.komori at sony.com>'s request for review:
Bug 215379: Implement HTTPServer for API tests in c++
https://bugs.webkit.org/show_bug.cgi?id=215379
Attachment 436271: Patch
https://bugs.webkit.org/attachment.cgi?id=436271&action=review
--- Comment #14 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 436271
--> https://bugs.webkit.org/attachment.cgi?id=436271
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=436271&action=review
> Tools/TestWebKitAPI/GenericConnectionPOSIX.cpp:37
> +static void initializeSSLLibrary()
> +{
> +#if HAVE(SSL)
I think HAVE(SSL) can go outside the declaration of initializeSSLLibrary, or we
would have an unused function if we don't have SSL.
> Tools/TestWebKitAPI/GenericConnectionPOSIX.cpp:71
> + X509_free(x509);
It would be nicer to use a smart pointer like I did with ssl::unique_ptr in
TCPServer.cpp
> Tools/TestWebKitAPI/GenericConnectionPOSIX.cpp:128
> + while (sentTotal < message.utf8().length()) {
I feel like each write call should be on a separate run loop iteration so that
long messages can be read on the same run loop. That also makes the
CompletionHandler useful.
> Tools/TestWebKitAPI/GenericConnectionPOSIX.cpp:169
> + completionHandler(WTFMove(result));
If the bytes aren't available immediately, this will be called with an empty
Vector. I think the intent was to call the completion handler whenever bytes
are received and wait until they are.
> Tools/TestWebKitAPI/GenericHTTPServer.cpp:73
> + result.append("Content-Length:");
This is basically duplicate code with HTTPResponse::serialize. They should
ideally be refactored to share common code. A lot of this patch is duplicate
code.
More information about the webkit-reviews
mailing list