Browse files

Merge git://github.com/deanlandolt/commonjs-utils

  • Loading branch information...
2 parents 8f138fa + 8928094 commit 5237619a8744fab93266a0c3dafe6a582d412425 @kriszyp committed Jul 29, 2010
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/jsgi/parse-header.js
View
2 lib/jsgi/parse-header.js
@@ -3,7 +3,9 @@
*/
exports["content-range"] = function(contentRange, pageSize) {
+ if (!contentRange) return;
var parts = contentRange.match(/(\d+)\-(\d+)\/(\d+)/);
+ if (!parts) return;
var r = {};
r.start = parseInt(parts[1], 10);
r.end = parseInt(parts[2], 10);

0 comments on commit 5237619

Please sign in to comment.