Skip to content

Commit

Permalink
fix(web-server): correct urlRegex in custom handlers
Browse files Browse the repository at this point in the history
I screwed this during the refactorings in 7255aa6, so this is just reverting to the original name of the property.
  • Loading branch information
vojtajina committed Jul 31, 2013
1 parent 5be66e2 commit a641c2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/web-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var proxyMiddleware = require('./middleware/proxy');
var createCustomHandler = function(customFileHandlers, /* config.basePath */ basePath) {
return function(request, response, next) {
for (var i = 0; i < customFileHandlers.length; i++) {
if (customFileHandlers[i].urlRegexp.test(request.url)) {
if (customFileHandlers[i].urlRegex.test(request.url)) {
return customFileHandlers[i].handler(request, response, 'fake/static', 'fake/adapter',
basePath, 'fake/root');
}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/web-server.spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe 'web-server', ->
it 'should load custom handlers', (done) ->
# TODO(vojta): change this, only keeping because karma-dart is relying on it
customFileHandlers.push {
urlRegexp: /\/some\/weird/
urlRegex: /\/some\/weird/
handler: (request, response, staticFolder, adapterFolder, baseFolder, urlRoot) ->
response.writeHead 222
response.end 'CONTENT'
Expand Down

0 comments on commit a641c2c

Please sign in to comment.