Bug 68446 - When using an ErrorDocument, a HEAD request still sends the full body
Summary: When using an ErrorDocument, a HEAD request still sends the full body
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.4.29
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-04 16:26 UTC by Robert Rothenberg
Modified: 2024-01-04 16:26 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Rothenberg 2024-01-04 16:26:21 UTC
I have set up an ErrorDocument with directs to local documents for a virtual host, e.g.

  ErrorDocument 400 /static/errors/generic.html
  ErrorDocument 403 /static/errors/generic.html

If I make a HEAD request, the server sends the result with a non-zero Content-Length. And it logs that number of bytes were sent.

Some utilities like curl will show an error that the transfer was closed with bytes remaining to be read.