Commit 3d4b8eea authored by Douglas Christopher Wilson's avatar Douglas Christopher Wilson

Merge tag '2.27.2'

parents a29c9ad1 c665664b
unreleased
==========
* Fix handling of URLs containing `://` in the path
3.3.1 / 2014-10-22
==================
......@@ -80,6 +85,15 @@
* remove various private `connect.utils` functions
* drop node.js 0.8 support
2.27.2 / 2014-10-28
===================
* Fix handling of URLs containing `://` in the path
* deps: body-parser@~1.9.2
- deps: qs@2.3.2
* deps: qs@2.3.2
- Fix parsing of mixed objects and values
2.27.1 / 2014-10-22
===================
......
......@@ -83,7 +83,7 @@ app.handle = function(req, res, out) {
var stack = this.stack
, searchIndex = req.url.indexOf('?')
, pathlength = searchIndex !== -1 ? searchIndex : req.url.length
, fqdn = 1 + req.url.substr(0, pathlength).indexOf('://')
, fqdn = req.url[0] !== '/' && 1 + req.url.substr(0, pathlength).indexOf('://')
, protohost = fqdn ? req.url.substr(0, req.url.indexOf('/', 2 + fqdn)) : ''
, removed = ''
, slashAdded = false
......
......@@ -32,6 +32,16 @@ describe('app.use()', function(){
.expect(200, '/?url=http://example.com/blog/post/1', done);
});
it('should ignore FQDN in path', function (done) {
app.use('/proxy', function (req, res) {
res.end(req.url);
});
rawrequest(app)
.get('/proxy/http://example.com/blog/post/1')
.expect(200, '/http://example.com/blog/post/1', done);
});
it('should adjust FQDN req.url', function(done){
app.use('/blog', function(req, res){
res.end(req.url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment