Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a bug in fu's handling of HEAD requests.

The fu.js code wasn't checking to see if a request method was HEAD.
That resulted in it sending a body to a head request.  This in turn
resulted in breaking the spec which the underlying Node library didn't
like.  In turn, this resulted in an uncaught exception which crashed the
server. Now if the request type is HEAD, it does the right thing.
  • Loading branch information...
commit f5f9f1fa0b86674fc13ea96a86d400f61ef05a6c 1 parent 8ec8bb2
@bensonk bensonk authored ry committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  fu.js
2  fu.js
@@ -84,7 +84,7 @@ fu.staticHandler = function (filename) {
return function (req, res) {
loadResponseData(function () {
res.writeHead(200, headers);
- res.end(body);
+ res.end(req.method === "HEAD" ? "" : body);
Please sign in to comment.
Something went wrong with that request. Please try again.