This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fix Fail when no user-agent header

  • Loading branch information...
bencevans committed Oct 7, 2012
1 parent 0ca86c8 commit 51515b47dfdc0ab1689b36091fcf845815ed4f3b
Showing with 3 additions and 2 deletions.
  1. +3 −2 app.js
View
5 app.js
@@ -34,8 +34,9 @@ repos.on('fetch', function (fetch) {
var server = http.createServer(function (req, res) {
- if(req.headers['user-agent'].match(/git/))
- return repos.handle(req, res);
+ if(req.headers['user-agent'])
+ if(req.headers['user-agent'].match(/git/))
+ return repos.handle(req, res);
if(req.url !== '/') {
res.statusCode = 404;

0 comments on commit 51515b4

Please sign in to comment.