[openstreetmap-website] Content-Length on HEAD requests (#406)

Tom Hughes notifications at github.com
Thu Aug 1 08:06:37 UTC 2013


Having said that I really don't see how this can happen, because the rails code is:

```ruby
    def call(env)
      if env["REQUEST_METHOD"] == "HEAD"
        env["REQUEST_METHOD"] = "GET"
        env["rack.methodoverride.original_method"] = "HEAD"
        status, headers, _ = @app.call(env)
        [status, headers, []]
      else
        @app.call(env)
      end
    end
```

which clearly preserves headers and discards the body.

I also don't actually see what you describe as I see no `Content-Length` header at all in the `HEAD` case - maybe apache is discarding it?


---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/406#issuecomment-21921148
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20130801/e5d4fe3a/attachment.html>


More information about the rails-dev mailing list