mirror of
https://github.com/zebrajr/express.git
synced 2025-12-06 12:19:51 +01:00
Merge tag '3.15.3' into 4.7.x
This commit is contained in:
commit
d8237b976b
15
History.md
15
History.md
|
|
@ -1,6 +1,10 @@
|
|||
unreleased
|
||||
==========
|
||||
|
||||
* fix `res.sendfile` regression for serving directory index files
|
||||
* deps: send@0.7.4
|
||||
- Fix incorrect 403 on Windows and Node.js 0.11
|
||||
- Fix serving index files without root dir
|
||||
* deps: serve-static@~1.4.4
|
||||
- deps: send@0.7.4
|
||||
|
||||
|
|
@ -342,6 +346,17 @@ unreleased
|
|||
- `app.route()` - Proxy to the app's `Router#route()` method to create a new route
|
||||
- Router & Route - public API
|
||||
|
||||
3.15.3 / 2014-08-04
|
||||
===================
|
||||
|
||||
* fix `res.sendfile` regression for serving directory index files
|
||||
* deps: connect@2.24.3
|
||||
- deps: serve-index@~1.1.5
|
||||
- deps: serve-static@~1.4.4
|
||||
* deps: send@0.7.4
|
||||
- Fix incorrect 403 on Windows and Node.js 0.11
|
||||
- Fix serving index files without root dir
|
||||
|
||||
3.15.2 / 2014-07-27
|
||||
===================
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"path-to-regexp": "0.1.3",
|
||||
"proxy-addr": "1.0.1",
|
||||
"range-parser": "1.0.0",
|
||||
"send": "0.7.3",
|
||||
"send": "0.7.4",
|
||||
"serve-static": "~1.4.4",
|
||||
"type-is": "~1.3.2",
|
||||
"vary": "0.1.0",
|
||||
|
|
|
|||
1
test/fixtures/blog/index.html
vendored
Normal file
1
test/fixtures/blog/index.html
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<b>index</b>
|
||||
|
|
@ -165,6 +165,30 @@ describe('res', function(){
|
|||
});
|
||||
})
|
||||
|
||||
it('should transfer a file', function (done) {
|
||||
var app = express();
|
||||
|
||||
app.use(function (req, res) {
|
||||
res.sendfile('test/fixtures/name.txt');
|
||||
});
|
||||
|
||||
request(app)
|
||||
.get('/')
|
||||
.expect(200, 'tobi', done);
|
||||
});
|
||||
|
||||
it('should transfer a directory index file', function (done) {
|
||||
var app = express();
|
||||
|
||||
app.use(function (req, res) {
|
||||
res.sendfile('test/fixtures/blog/');
|
||||
});
|
||||
|
||||
request(app)
|
||||
.get('/')
|
||||
.expect(200, '<b>index</b>', done);
|
||||
});
|
||||
|
||||
describe('with an absolute path', function(){
|
||||
it('should transfer the file', function(done){
|
||||
var app = express();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user