shithub: riscv

Download patch

ref: 0201795805f22e3d8d0b347d06c39d934c8b6866
parent: ca7f016c7b21f7cf418201ba6ae955a9234e4304
author: stanley lieber <stanley.lieber@gmail.com>
date: Fri Feb 21 21:24:37 EST 2014

rc-httpd/handlers/serve-static: restore Content-length

--- a/rc/bin/rc-httpd/handlers/serve-static
+++ b/rc/bin/rc-httpd/handlers/serve-static
@@ -25,6 +25,7 @@
 echo 'HTTP/1.1 200 OK'^$cr
 emit_extra_headers
 echo 'Content-type: '^$type^'; charset=utf-8'^$cr
+echo 'Content-length: '^`{ls -l $full_path | awk '{print $6}'}
 echo 'Cache-control: max-age='^$max_age^$cr
 echo $cr
 exec cat $full_path