Project

General

Profile

Actions

Bug #1273

closed

BUG: Incorrect handling of HEAD requests for error handlers

Added by silog over 17 years ago. Updated over 17 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

Description

Posted by Chris Webb (Guest)
on 26.07.2007 09:48

Something has changed in the handling of HTTP HEAD requests between
lighttpd 1.4.13 and 1.4.16. I have a typical rails-style configuration
with


  server.error-handler-404 = "/dispatch.fcgi" 

and GET requests for pages handled by /dispatch.fcgi work correctly with
a 200 OK response in both versions. However, on 1.4.16, a HEAD request
gets returned with a 404 Not Found response whereas the same
configuration on 1.4.13 correctly returns a 200 OK matching the
corresponding GET (as it should):


  $ telnet new-version 80
  Trying 127.0.0.2...
  Connected to new-version.
  Escape character is '^]'.
  HEAD / HTTP/1.0
  Host: www.testsite.com

  HTTP/1.0 404 Not Found
  Connection: close
  Content-Type: text/html; charset=utf-8
  Cache-Control: no-cache
  Content-Length: 3813
  Date: Thu, 26 Jul 2007 09:16:22 GMT
  Server: lighttpd/1.4.16

  Connection closed by foreign host.

whereas


  $ telnet old-version 80
  Trying 127.0.0.3...
  Connected to old-version.
  Escape character is '^]'.
  HEAD / HTTP/1.0
  Host: www.testsite.com

  HTTP/1.0 200 OK
  Connection: close
  Content-Type: text/html; charset=utf-8
  Cache-Control: no-cache
  Content-Length: 3813
  Date: Thu, 26 Jul 2007 09:21:06 GMT
  Server: lighttpd/1.4.13

  Connection closed by foreign host.

This is potentially very serious because of the way it will interact
with web caches.

Actions #1

Updated by darix over 17 years ago

there is a known regression with the 404 handler in 1.4.16.
for rails i would suggest using the mod_magnet solution anyway.
see http://pixel.global-banlist.de/tags/mod_magnet

Actions #2

Updated by darix over 17 years ago

  • Status changed from New to Fixed
  • Resolution set to duplicate

this is a duplicate of #1270

Actions

Also available in: Atom