Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix crash on some requests. #11

Merged
merged 1 commit into from

2 participants

@hughsk

There was a line missing, so once a request hit the second handler it would throw an error.

@hughsk hughsk Fix crash on some requests.
There was a line missing, so once a request hit the second handler
it would throw an error.
16eba61
@substack substack merged commit 16eba61 into substack:master
@substack
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 26, 2012
  1. @hughsk

    Fix crash on some requests.

    hughsk authored
    There was a line missing, so once a request hit the second handler
    it would throw an error.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/handle.js
View
2  lib/handle.js
@@ -55,6 +55,8 @@ handlers.push(function (req, res) {
handlers.push(function (req, res) {
if (req.method !== 'GET') return false;
+
+ var u = url.parse(req.url);
var m = u.pathname.match(/^\/(.+)\/HEAD$/);
if (!m) return false;
if (/\.\./.test(m[1])) return false;
Something went wrong with that request. Please try again.