Ticket #119 (closed defect: fixed)

Opened 3 years ago

Last modified 1 year ago

Content-Length set to 0 on HEAD requests

Reported by: dgl Assigned to: jan
Priority: normal Milestone: 1.4.13
Component: core Version:
Severity: normal Keywords: patch cleanup
Cc: Blocking:
Need Feedback:

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.

Attachments

lighttpd-#119-v1.patch (0.9 kB) - added by bdash on 02/22/2006 11:47:11 AM.
Only overwrite the Content-Length header for a non-HEAD request or if we have non-zero-length response body

Change History

07/31/2005 01:05:17 PM changed by jan

  • status changed from new to closed.
  • resolution set to worksforme.

Can't reproduce in 1.3.16.

HEAD / HTTP/1.0

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

02/21/2006 02:04:49 AM changed by bdash

  • status changed from closed to reopened.
  • resolution deleted.

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.

02/22/2006 11:47:11 AM changed by bdash

  • attachment lighttpd-#119-v1.patch added.

Only overwrite the Content-Length header for a non-HEAD request or if we have non-zero-length response body

03/01/2006 12:30:40 PM changed by conny

  • keywords set to patch.

03/01/2006 01:05:11 PM changed by conny

  • keywords changed from patch to patch cleanup.

10/07/2006 11:11:35 AM changed by anonymous

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

10/07/2006 05:19:48 PM changed by jan

  • status changed from reopened to closed.
  • resolution set to fixed.
  • milestone set to 1.4.13.

thanks for bringing this topic back to the top. fixed in [1382].


Add/Change #119 (Content-Length set to 0 on HEAD requests)




Change Properties
Action