title: Heroku h18 error while my backend respond 200 to their router (multipart/form-data)
body: <p>I have an error when deploying my golang API on Heroku.
  Heroku detects a disconnect and report a 500 error, while in the logs my server correctly answer with a 200. It is <code>multipart/form-data</code> request with a file attached, and I simply return a JSON in the response body.</p>
  <pre><code>2019-03-01T07:35:29.060814+00:00 app[web.1]: xx.x.xx.x - - [01/Mar/2019:07:35:29 +0000] &quot;POST /v1/fixture/extract/ HTTP/1.1&quot; 200 2133
  2019-03-01T07:35:29.413179+00:00 heroku[router]: sock=backend at=error code=H18 desc=&quot;Server Request Interrupted&quot; method=POST path=&quot;/v1/fixture/extract/&quot; host=xxx.com request_id=28cdf569-2e00-47b8-9989-9280865707c8 fwd=&quot;xx.x.xx.x&quot; dyno=web.1 connect=1ms service=352ms status=503 bytes=2280 protocol=https
  </code></pre>
  <p>Here is the curl when I hit the service locally without reverse proxy:</p>
  <pre><code>*   Trying ::1...
  * TCP_NODELAY set
  * Connected to localhost (::1) port 8080 (#0)
  &gt; POST /v1/fixture/extract/ HTTP/1.1
  &gt; Host: localhost:8080
  &gt; User-Agent: curl/7.64.0
  &gt; accept: application/json
  &gt; Content-Length: 154090
  &gt; Content-Type: multipart/form-data; boundary=------------------------7a9bb5de3838f429
  &gt; Expect: 100-continue
  &gt; 
  &lt; HTTP/1.1 200 OK
  &lt; Content-Type: application/json
  &lt; Date: Fri, 01 Mar 2019 07:44:50 GMT
  &lt; Connection: close
  &lt; Transfer-Encoding: chunked
  &lt; 
  </code></pre>
  <p>I struggle to find the reason why this would happen.</p>
  <p>My go function:</p>
  <pre class="lang-golang prettyprint-override"><code>func FixtureExtract(w http.ResponseWriter, r *http.Request) {
      w.Header().Set(&quot;Content-Type&quot;, &quot;application/json&quot;)
  
      json.NewEncoder(w).Encode(ExtractFixture{})
  }
  </code></pre>