Project

General

Profile

Actions

Bug #119

closed

Content-Length set to 0 on HEAD requests

Added by Anonymous almost 19 years ago. Updated over 16 years ago.

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

Description

Content-Length: 0 is sent on HEAD requests when it should be the length of the body that will be sent on a GET request.

-- dgl


Files

lighttpd-_119-v1.patch (886 Bytes) lighttpd-_119-v1.patch Only overwrite the Content-Length header for a non-HEAD request or if we have non-zero-length response body bdash, 2006-02-22 11:47
Actions #1

Updated by jan over 18 years ago

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

Can't reproduce in 1.3.16.

HEAD / HTTP/1.0

HTTP/1.0 200 OK
Content-Length: 4357
...

Actions #2

Updated by bdash about 18 years ago

  • Status changed from Fixed to Need Feedback
  • Resolution deleted (worksforme)

This occurs when a script responds to a HEAD request by returning no data but not setting a Content-Length header. Lighttpd inserts the Content-Length header based on the data received. In my opinion it would make more sense to omit the Content-Length header in the zero-length case as if the script intended a zero-byte Content-Length it would have specified that in the header.

Actions #3

Updated by Anonymous over 17 years ago

Is there any plan to do anything with this patch? What good is it if people submit patches which are then ignored?

Actions #4

Updated by jan over 17 years ago

  • Status changed from Need Feedback to Fixed
  • Resolution set to fixed

thanks for bringing this topic back to the top. fixed in r1382.

Actions

Also available in: Atom