title: Does nginx support early hint request (103 status)
body: <p>I have used nginx as a reverse proxy with puma server. </p>
  
  <p>I am sending 103 status response from the puma for early hint about assets that would be needed.</p>
  
  <p>When I load the page in chrome, it shows me ERR_SPDY_PROTOCOL_ERROR error.
  It works fine on Firefox. Not working on safari as well.</p>
  
  <p>It works fine in chrome only if I stop sending 103 status response from puma.</p>
  
  <p>Below is my nginx.config file</p>
  
  <pre><code>http {
  upstream app {
      server unix:/Users/rohan/puma.sock fail_timeout=0;
  }
  
  server {
      listen 443 ssl http2;
      server_name localhost;
  
      ssl_certificate /usr/Users/rohan/localhost.crt;
      ssl_certificate_key /Users/rohan/localhost.key;
      root /Users/rohan/test_app/my_app/public;
  
      try_files $uri/index.html $uri @app;
      access_log /Users/rohan/nginx.access.log;
  
  
      location @app {
          proxy_pass http://app;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
          proxy_redirect off;
          http2_push_preload on;
      }
  
      error_page 500 502 503 504 /500.html;
      client_max_body_size 4G;
      keepalive_timeout 10;
   }
  }
  </code></pre>
  
  <p>Below is output from nghttp client</p>
  
  <pre><code>Rohans-MacBook: rohan$ nghttp -nv https://127.0.0.1/students
  [  0.010] Connected
  [WARNING] Certificate verification failed: Hostname mismatch
  The negotiated protocol: h2
  [  0.013] recv SETTINGS frame &lt;length=18, flags=0x00, stream_id=0&gt;
            (niv=3)
            [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):128]
            [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65536]
            [SETTINGS_MAX_FRAME_SIZE(0x05):16777215]
  [  0.013] recv WINDOW_UPDATE frame &lt;length=4, flags=0x00, stream_id=0&gt;
            (window_size_increment=2147418112)
  [  0.013] send SETTINGS frame &lt;length=12, flags=0x00, stream_id=0&gt;
            (niv=2)
            [SETTINGS_MAX_CONCURRENT_STREAMS(0x03):100]
            [SETTINGS_INITIAL_WINDOW_SIZE(0x04):65535]
  [  0.013] send SETTINGS frame &lt;length=0, flags=0x01, stream_id=0&gt;
            ; ACK
            (niv=0)
  [  0.013] send PRIORITY frame &lt;length=5, flags=0x00, stream_id=3&gt;
            (dep_stream_id=0, weight=201, exclusive=0)
  [  0.013] send PRIORITY frame &lt;length=5, flags=0x00, stream_id=5&gt;
            (dep_stream_id=0, weight=101, exclusive=0)
  [  0.013] send PRIORITY frame &lt;length=5, flags=0x00, stream_id=7&gt;
            (dep_stream_id=0, weight=1, exclusive=0)
  [  0.013] send PRIORITY frame &lt;length=5, flags=0x00, stream_id=9&gt;
            (dep_stream_id=7, weight=1, exclusive=0)
  [  0.013] send PRIORITY frame &lt;length=5, flags=0x00, stream_id=11&gt;
            (dep_stream_id=3, weight=1, exclusive=0)
  [  0.013] send HEADERS frame &lt;length=43, flags=0x25, stream_id=13&gt;
            ; END_STREAM | END_HEADERS | PRIORITY
            (padlen=0, dep_stream_id=11, weight=16, exclusive=0)
            ; Open new stream
            :method: GET
            :path: /students
            :scheme: https
            :authority: 127.0.0.1
            accept: */*
            accept-encoding: gzip, deflate
            user-agent: nghttp2/1.32.0
  [  0.014] recv SETTINGS frame &lt;length=0, flags=0x01, stream_id=0&gt;
            ; ACK
            (niv=0)
  [  0.071] recv (stream_id=13) :method: GET
  [  0.071] recv (stream_id=13) :path: /assets/application.self-f0d704deea029cf000697e2c0181ec173a1b474645466ed843eb5ee7bb215794.css
  [  0.071] recv (stream_id=13) :scheme: https
  [  0.071] recv (stream_id=13) :authority: 127.0.0.1
  [  0.071] recv (stream_id=13) accept-encoding: gzip, deflate
  [  0.071] recv (stream_id=13) user-agent: nghttp2/1.32.0
  [  0.071] recv PUSH_PROMISE frame &lt;length=106, flags=0x04, stream_id=13&gt;
            ; END_HEADERS
            (padlen=0, promised_stream_id=2)
  [  0.071] recv (stream_id=13) :status: 103
  [  0.071] recv (stream_id=13) server: nginx/1.13.12
  [  0.071] recv (stream_id=13) date: Wed, 30 May 2018 18:15:58 GMT
  [  0.071] recv (stream_id=13) link: &lt;/assets/application.self-f0d704deea029cf000697e2c0181ec173a1b474645466ed843eb5ee7bb215794.css&gt;; rel=preload; as=style
  [  0.071] recv HEADERS frame &lt;length=132, flags=0x04, stream_id=13&gt;
            ; END_HEADERS
            (padlen=0)
            ; First response header
  [  0.071] recv (stream_id=2) :status: 200
  [  0.071] recv (stream_id=2) server: nginx/1.13.12
  [  0.071] recv (stream_id=2) date: Wed, 30 May 2018 18:15:58 GMT
  [  0.071] recv (stream_id=2) content-type: text/css; charset=utf-8
  [  0.071] recv (stream_id=2) content-length: 676
  [  0.071] recv (stream_id=2) cache-control: public, max-age=31536000
  [  0.071] recv (stream_id=2) etag: "f0d704deea029cf000697e2c0181ec173a1b474645466ed843eb5ee7bb215794"
  [  0.071] recv (stream_id=2) x-request-id: a7bd5757-b7ab-4d7a-9c48-10b5133fe11e
  [  0.071] recv (stream_id=2) x-runtime: 0.010249
  [  0.071] recv HEADERS frame &lt;length=198, flags=0x04, stream_id=2&gt;
            ; END_HEADERS
            (padlen=0)
            ; First push response header
  [  0.071] recv DATA frame &lt;length=676, flags=0x01, stream_id=2&gt;
            ; END_STREAM
  [  0.080] send RST_STREAM frame &lt;length=4, flags=0x00, stream_id=13&gt;
            (error_code=PROTOCOL_ERROR(0x01))
  [  0.080] send GOAWAY frame &lt;length=8, flags=0x00, stream_id=0&gt;
            (last_stream_id=2, error_code=NO_ERROR(0x00), opaque_data(0)=[])
  Some requests were not processed. total=2, processed=1
  </code></pre>
  
  <p>Is Early hint supported by nginx? I am not able to get any documentation stating that it supports it. But I assummed it as it supports HTTP/2.</p>