Permalink
Browse files

Handle missing User-Agent

Fixes #17.

Repro: curl -H 'User-Agent:' $URL to something serving an asset.
  • Loading branch information...
daaku committed Nov 10, 2011
1 parent b3b29e5 commit 8e1be61a9075f54a579f8d489ddede37032ae12b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/assetmanager.js
View
@@ -303,7 +303,7 @@ module.exports = function assetManager (settings) {
var groupServed;
settings.forEach(function (group, groupName) {
if (group.route.test(req.url)) {
- var userAgent = req.headers['user-agent'];
+ var userAgent = req.headers['user-agent'] || '';
groupServed = group;
if (group.dataType === 'javascript') {
mimeType = 'application/javascript';

0 comments on commit 8e1be61

Please sign in to comment.