Skip to content

Commit

Permalink
Remove query part of req.url for test requests.
Browse files Browse the repository at this point in the history
The query part should not be treated as a part of the filename.
  • Loading branch information
reid committed Aug 23, 2012
1 parent c91c0e0 commit f4375f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/hub/index.js
Expand Up @@ -207,15 +207,19 @@ Hub.prototype.generateId = function () {
* @method _handleTestRequest * @method _handleTestRequest
* @private * @private
*/ */
Hub.prototype._handleTestRequest = function (server, agentId, batchId, filename) { Hub.prototype._handleTestRequest = function (server, agentId, batchId, path) {
var batch = this.batchManager.getBatch(batchId); var batch = this.batchManager.getBatch(batchId),
file = urlParser.parse(path).pathname;


if (!batch) { if (!batch) {
server.res.message(404, "Batch not found."); server.res.message(404, "Batch not found.");
return; return;
} }


batch.handleFileRequest(server, agentId, filename); this.debug("_handleTestRequest: path =", path,
"file =", file);

batch.handleFileRequest(server, agentId, file);
}; };


Hub.prototype._onTowerConnection = function (socket) { Hub.prototype._onTowerConnection = function (socket) {
Expand Down

0 comments on commit f4375f9

Please sign in to comment.