Skip to content

Commit

Permalink
ignore query strings in mount matching, fixed the http demo by removi…
Browse files Browse the repository at this point in the history
…ng the fallback route
  • Loading branch information
James Halliday committed Aug 11, 2011
1 parent 23d8f33 commit c4ca3d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
3 changes: 1 addition & 2 deletions bin/bundle.js
Expand Up @@ -2,8 +2,7 @@ var fs = require('fs');
var path = require('path');
var browserify = require('browserify');

//var src = browserify({ filter : require('uglify-js') })
var src = browserify()
var src = browserify({ filter : require('uglify-js') })
.require(__dirname + '/../browser/index.js')
.bundle()
;
Expand Down
9 changes: 0 additions & 9 deletions examples/web-http/server.js
Expand Up @@ -9,15 +9,6 @@ var server = http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type' : 'text/html' });
res.end(index);
}
else if (!res.finished) {
process.nextTick(function () {
if (!res.finished) {
res.setCode = 404;
res.setHeader('content-type', 'text/html');
res.end('not found');
}
});
}
});

dnode(function (client) {
Expand Down
4 changes: 2 additions & 2 deletions lib/stream_socketio.js
Expand Up @@ -33,7 +33,7 @@ module.exports = function (webserver, mount, ioOptions) {

if (mount && webserver.use) {
webserver.use(function (req, res, next) {
if (req.url === mount) {
if (req.url.split('?')[0] === mount) {
bundle(res);
}
else next()
Expand All @@ -47,7 +47,7 @@ module.exports = function (webserver, mount, ioOptions) {
if (!Array.isArray(ev.request)) ev.request = [ ev.request ];

ev.request.push(function (req, res) {
if (!res.finished && req.url === mount) {
if (!res.finished && req.url.split('?')[0] === mount) {
bundle(res);
}
});
Expand Down

0 comments on commit c4ca3d6

Please sign in to comment.