Skip to content

Commit

Permalink
decode
Browse files Browse the repository at this point in the history
  • Loading branch information
geta6 committed Jun 5, 2013
1 parent 2a4241b commit 7519601
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions lib/stream.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "connect-stream",
"version": "0.2.3",
"version": "0.2.4",
"description": "connect middleware for 206 partial content request",
"main": "lib/stream.js",
"daemon": true,
Expand Down
5 changes: 3 additions & 2 deletions src/stream.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ module.exports = (cacheOptions = {}) ->
checkIn.apply @, arguments
readStream.pipe res

if cacheOptions.static and req.url isnt '/'
return stream src, {} if fs.existsSync (src = path.join cacheOptions.path, req.url)
url = decodeURI req.url
if cacheOptions.static and url isnt '/'
return stream src, {} if fs.existsSync (src = path.join cacheOptions.path, url)
return next()

0 comments on commit 7519601

Please sign in to comment.