senchalabs/connect — pull request #493 by matthiasdg (2012-02-29 18:08:19+00:00)
Title: content-range fix when requested range > file size

Right now, static.js generates a Content-Range header which is incorrect if the incoming last-byte-position is greater than the total length of the file. According to RFC2616, a byte-content-range-spec with a byte-range-resp-spec whose last- byte-pos value is less than its first-byte-pos value, or whose instance-length value is less than or equal to its last-byte-pos value, is invalid.
(noticed this since Content-Length (which was apparently already fixed some time ago) was still wrong in my version installed from npm and that caused me some troubles)