title: curl post request is not working with option --http2, but it works fine when I use --http2-prior-knowledge
body: <p>I have created spring-boot application with tomcat 9.0.16, spring-boot 2.1.3.RELEASE, JDK1.8. 
  When I am making curl post request with --http2 its saying "curl: (56) Recv failure: Connection reset by peer".</p>
  
  <p>but when I use --http-prior-knowledge it works fine.</p>
  
  <p>my application.property file</p>
  
  <pre><code>server.port=8080
  server.http2.enabled=true
  </code></pre>
  
  <p>and congif file</p>
  
  <pre><code>@Bean
      public WebServerFactoryCustomizer tomcatCustomizer() {
          return (container) -&gt; {
              if (container instanceof TomcatServletWebServerFactory) {
                  ((TomcatServletWebServerFactory) container)
                          .addConnectorCustomizers((connector) -&gt; {
                              connector.addUpgradeProtocol(new Http2Protocol());
                          });
              }
          };
      }
  </code></pre>
  
  <ol>
  <li>for curl -vvv --http2 -H 'Content-Type: application/json' -H 'cache-control: no-cache' -XPOST <a href="http://localhost:8080/save" rel="nofollow noreferrer">http://localhost:8080/save</a> -d '{"xyz":"xyz"}'
  logs of curl-></li>
  </ol>
  
  <pre><code>*   Trying ::1...
  * TCP_NODELAY set
  * Expire in 150000 ms for 3 (transfer 0x7fc78a808a00)
  * Expire in 200 ms for 4 (transfer 0x7fc78a808a00)
  * Connected to localhost (::1) port 8080 (#0)
  &gt; POST /save HTTP/1.1
  &gt; Host: localhost:8080
  &gt; User-Agent: curl/7.64.0
  &gt; Accept: */*
  &gt; Connection: Upgrade, HTTP2-Settings
  &gt; Upgrade: h2c
  &gt; HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
  &gt; Content-Type: application/json
  &gt; Postman-Token: 52e0708b-ce97-4baa-a567-2dabc675f3dd
  &gt; cache-control: no-cache
  &gt; Content-Length: 702
  &gt;
  * upload completely sent off: 702 out of 702 bytes
  &lt; HTTP/1.1 101
  &lt; Connection: Upgrade
  &lt; Upgrade: h2c
  &lt; Date: Wed, 27 Mar 2019 12:29:18 GMT
  * Received 101
  * Using HTTP2, server supports multi-use
  * Connection state changed (HTTP/2 confirmed)
  * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  * Connection state changed (MAX_CONCURRENT_STREAMS == 200)!
  * Recv failure: Connection reset by peer
  * Failed receiving HTTP2 data
  * Send failure: Broken pipe
  * Failed sending HTTP2 data
  * Connection #0 to host localhost left intact
  curl: (56) Recv failure: Connection reset by peer
  </code></pre>
  
  <ol start="2">
  <li>curl -vvv --http2-prior-knowledge -H 'Content-Type: application/json' -H 'Postman-Token: 52e0708b-ce97-4baa-a567-2dabc675f3dd' -H 'cache-control: no-cache' -XPOST <a href="http://localhost:8080/save" rel="nofollow noreferrer">http://localhost:8080/save</a> -d '{"xyz":"xyz"}'</li>
  </ol>
  
  <pre><code>* Expire in 0 ms for 6 (transfer 0x7fc5c0808a00)
  *   Trying ::1...
  * TCP_NODELAY set
  * Expire in 150000 ms for 3 (transfer 0x7fc5c0808a00)
  * Expire in 200 ms for 4 (transfer 0x7fc5c0808a00)
  * Connected to localhost (::1) port 8080 (#0)
  * Using HTTP2, server supports multi-use
  * Connection state changed (HTTP/2 confirmed)
  * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  * Using Stream ID: 1 (easy handle 0x7fc5c0808a00)
  &gt; POST /save HTTP/2
  &gt; Host: localhost:8080
  &gt; User-Agent: curl/7.64.0
  &gt; Accept: */*
  &gt; Content-Type: application/json
  &gt; Postman-Token: 52e0708b-ce97-4baa-a567-2dabc675f3dd
  &gt; cache-control: no-cache
  &gt; Content-Length: 702
  &gt;
  * We are completely uploaded and fine
  * Connection state changed (MAX_CONCURRENT_STREAMS == 200)!
  &lt; HTTP/2 200
  &lt; content-type: application/json;charset=UTF-8
  &lt; date: Wed, 27 Mar 2019 12:32:26 GMT
  &lt;
  * Connection #0 to host localhost left intact
  true%
  </code></pre>