]> granicus.if.org Git - curl/commitdiff
http: Don't break the header into chunks if HTTP/2
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>
Tue, 16 Feb 2016 19:44:57 +0000 (14:44 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 16 Feb 2016 19:49:12 +0000 (14:49 -0500)
nghttp2 callback deals with TLS layer and therefore the header does not
need to be broken into chunks.

Bug: https://github.com/curl/curl/issues/659
Reported-by: Kazuho Oku
lib/http.c

index 62952a871e658a6079a69412e388aa71d5c3a932..55ec3cbf109642f728a0b1d34819d37d662b6be2 100644 (file)
@@ -1091,7 +1091,7 @@ CURLcode Curl_add_buffer_send(Curl_send_buffer *in,
   }
 
 
-  if(conn->handler->flags & PROTOPT_SSL) {
+  if((conn->handler->flags & PROTOPT_SSL) && conn->httpversion != 20) {
     /* We never send more than CURL_MAX_WRITE_SIZE bytes in one single chunk
        when we speak HTTPS, as if only a fraction of it is sent now, this data
        needs to fit into the normal read-callback buffer later on and that