title: Golang HTTP server timeout
body: <p>I'm trying to write a web server in golang to handle geocoding requests.  Some of these requests take longer than a minute to process. In this case, the server seems to be returning an empty body to the client, though the handler keeps running.  I've tried the code below to no avail.  Am I missing something?  Is it possible this is a problem with <a href="http://www.gorillatoolkit.org/pkg/pat" rel="nofollow noreferrer">pat</a>?</p>
  
  <pre><code>r := pat.New()
  
  r.Get("/geocode", GeocodeHandler)
  r.Get("/status", StatusHandler)
  r.Get("/", InvalidHandler)
  
  s := &amp;http.Server{
      Addr: ":"+port,
      Handler: r,
      ReadTimeout: 10 * time.Minute,
      WriteTimeout: 10 * time.Minute,
      MaxHeaderBytes: 0,
  }
  
  s.ListenAndServe()
  </code></pre>
  
  <p>The client is in ruby.  I don't believe that's the problem though, since I see similar behavior if I use curl.</p>
  
  <pre><code>uri = URI(URI.escape("http://blah.com/geocode?address=#{address}"))
  http = Net::HTTP.new(uri.host, uri.port)
  http.read_timeout = 10 * 60
  response = http.request(Net::HTTP::Get.new(uri.request_uri))
  </code></pre>