Permalink
Switch branches/tags
Nothing to show
Commits on Aug 13, 2011
  1. (dist) version bump

    cloudhead committed Aug 13, 2011
Commits on Aug 11, 2011
  1. Merge pull request #28 from cimnine/master

    Alexis Sellier
    Alexis Sellier committed Aug 11, 2011
    Root Jail rejects all requests with 'Access denied'
  2. Fix: International characters (like umlauts) in URLs where not decoded

    cimnine committed Aug 11, 2011
    The filename requested was "Summerfäscht.jpg", what encodes to
    "Summerf 30X1.D78P-10654scht.jpg". The reconversion was not made in
    node-static. This lead to a 404 despite the files availability.
  3. FIX: Root Jail rejected all requests with 'Access denied'

    cimnine committed Aug 11, 2011
    The comparison between the root path and the filepath did reject all
    files. (At least if you .server('.') ). Fixed by resolving each path to
    an absolute path with path.resolve() and comparing absolute paths. In
    addition, this seems to me to be a saver comparison. Possibly reduces
    the cache memory footprint as the key is now the full path. (Is only
    true if previously multiple relative paths lead to the same absolute
    path.)
Commits on Aug 9, 2011
  1. (dist) version bump

    cloudhead committed Aug 9, 2011
Commits on Jul 22, 2011
  1. (dist) version bump

    cloudhead committed Jul 22, 2011
  2. pass all headers to

    cloudhead committed Jul 22, 2011
  3. Merge pull request #26 from brapse/master

    Alexis Sellier
    Alexis Sellier committed Jul 22, 2011
    allow headers to be overwritten
Commits on May 2, 2011
  1. fix file-serving bug

    cloudhead committed May 2, 2011
Commits on Apr 30, 2011
  1. (dist) version bump

    cloudhead committed Apr 30, 2011
  2. (dist) version bump

    cloudhead committed Apr 30, 2011
Commits on Apr 15, 2011
  1. (dist) version bump

    cloudhead committed Apr 15, 2011
  2. use Stream#pipe

    cloudhead committed Apr 15, 2011
Commits on Oct 29, 2010
  1. fix buffer for node 0.3.0 compat

    cloudhead
    cloudhead committed Oct 29, 2010
Commits on Oct 13, 2010
  1. (dist) version bump

    cloudhead
    cloudhead committed Oct 13, 2010
  2. fix chunk copy error in node 0.2.3+

    cloudhead
    cloudhead committed Oct 13, 2010
  3. Add support for HTML5 cache.manifest files

    statonjr authored and Alexis Sellier committed Sep 19, 2010
  4. added favicon image/x-icon MIME type to mime.js

    sideshowbarker authored and Alexis Sellier committed Sep 23, 2010
  5. added SVG MIME type to mime.js

    sideshowbarker authored and Alexis Sellier committed Sep 23, 2010
Commits on Aug 27, 2010
  1. (dist) version bump

    cloudhead
    cloudhead committed Aug 27, 2010
  2. fix mstat last-modified bug

    cloudhead
    cloudhead committed Aug 27, 2010
Commits on Aug 12, 2010
  1. (dist) remove 'lib' from directories

    cloudhead
    cloudhead committed Aug 12, 2010
  2. (dist doc) version bump & update docs

    cloudhead
    cloudhead committed Aug 12, 2010
  3. (api) serveFile takes a status and headers now.

    cloudhead
    cloudhead committed Aug 12, 2010
    Major refactor to keep things clean, and manageable.
Commits on Aug 6, 2010
  1. (dist) version bump

    cloudhead
    cloudhead committed Aug 6, 2010
  2. If we're automatically serving up the index.html from a directory, we…

    jeremybarnes authored and Alexis Sellier committed Aug 5, 2010
    … need
    
    to perform an extra stat() call to get the size of that file.  Otherwise,
    we end up setting the context-length to the size of the directory (4096
    bytes in my case).
    
    This would lead to the first N bytes of the file being served, and the
    client hanging around: the client was expecting more bytes, but the server
    was just waiting for the client to send another request.
    
    Even stranger, sometimes in the browser I'd get some binary data that looked
    like it could be a memory dump.  I don't know if that was a problem with
    firefox or if node-static was serving up some random data.
    
    ----
    
    Testing:
    
    I have a directory with an index.html file with 548 bytes that I'm serving
    up.
    
    Before:
    
    jeremy@dev:~/projects/xxx$ wget -S http://localhost:9876/
    --2010-08-05 14:26:42--  http://localhost:9876/
    Resolving localhost... ::1, 127.0.0.1
    Connecting to localhost|::1|:9876... failed: Connection refused.
    Connecting to localhost|127.0.0.1|:9876... connected.
    HTTP request sent, awaiting response...
      HTTP/1.1 200 OK
      Cache-Control: max-age=1
      Server: node-static/0.4.2
      Etag: "14160490-4096-1281030888000"
      Date: Thu, 05 Aug 2010 18:26:42 GMT
      Last-Modified: Thu, 05 Aug 2010 17:54:48 GMT
      Content-Length: 4096
      Content-Type: text/html
      Connection: keep-alive
    Length: 4096 (4.0K) [text/html]
    Saving to: `index.html.7'
    
    13% [====>                                  ] 548         --.-K/s  eta 2m 15s  ^C
    
    After fix:
    
    jeremy@dev:~/projects/xxx$ wget -S http://localhost:9876/
    --2010-08-05 14:51:41--  http://localhost:9876/
    Resolving localhost... ::1, 127.0.0.1
    Connecting to localhost|::1|:9876... failed: Connection refused.
    Connecting to localhost|127.0.0.1|:9876... connected.
    HTTP request sent, awaiting response...
      HTTP/1.1 200 OK
      Cache-Control: max-age=1
      Server: node-static/0.4.2
      Etag: "14160533-548-1281028503000"
      Date: Thu, 05 Aug 2010 18:51:41 GMT
      Last-Modified: Thu, 05 Aug 2010 17:15:03 GMT
      Content-Length: 548
      Content-Type: text/html
      Connection: keep-alive
    Length: 548 [text/html]
    Saving to: `index.html.8'
    
    100%[======================================>] 548         --.-K/s   in 0s
    
    2010-08-05 14:51:41 (1.48 MB/s) - `index.html.8' saved [548/548]
    
    Note that the Content-Length is now correct.
  3. (doc) document serveFile

    cloudhead
    cloudhead committed Aug 6, 2010
Commits on Aug 4, 2010
  1. (dist) version bump

    cloudhead
    cloudhead committed Aug 4, 2010
  2. fix 304 condition

    cloudhead
    cloudhead committed Aug 4, 2010
Commits on Aug 3, 2010
  1. (dist) version bump

    cloudhead
    cloudhead committed Aug 3, 2010
  2. only serve from cache if it's recent enough

    cloudhead
    cloudhead committed Aug 3, 2010