swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 1c587162e0454c840acfe38e1de4f53c0ad6cbee
parent 90de3813d4a5c9d09238a94f7087b94d69c645d4
Author: uriel@localhost.localdomain <unknown>
Date:   Sun,  9 Aug 2009 18:39:54 +0200

For HEAD request, only quit after we send the new line that ends the headers section. This was making nginx unhappy. Thanks arg for reporting, tracking it down and fixing this bug!
Diffstat:
Mbin/werc.rc | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/werc.rc b/bin/werc.rc @@ -123,13 +123,13 @@ fn werc_exec_request { for(h in $extraHttpHeaders) echo $h echo 'Content-Type: '^$http_content_type - if(~ $REQUEST_METHOD HEAD) - exit echo # End of HTTP headers if(! ~ $#debug 0) dprint $"SERVER_NAME^$"REQUEST_URI - $"HTTP_USER_AGENT - $"REQUEST_METHOD - $"handler_body_main - $"master_template + if(~ $REQUEST_METHOD HEAD) + exit template $headers $master_template | awk_buffer echo $res_tail