Socket
Socket
Sign inDemoInstall

express

Package Overview
Dependencies
Maintainers
1
Versions
279
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express - npm Package Compare versions

Comparing version 3.0.4 to 3.0.5

7

History.md
3.0.5 / 2012-12-19
==================
* add throwing when a non-function is passed to a route
* fix: explicitly remove Transfer-Encoding header from 204 and 304 responses
* revert "add 'etag' option"
3.0.4 / 2012-12-05

@@ -3,0 +10,0 @@ ==================

1

lib/application.js

@@ -50,3 +50,2 @@ /**

this.enable('x-powered-by');
this.enable('etag');
this.set('env', process.env.NODE_ENV || 'development');

@@ -53,0 +52,0 @@ debug('booting in %s mode', this.get('env'));

@@ -23,3 +23,3 @@ /**

exports.version = '3.0.3';
exports.version = '3.0.5';

@@ -50,3 +50,3 @@ /**

* Expose connect.middleware as express.*
* for example `express.logger` etc.
* for example `express.logger` etc.
*/

@@ -53,0 +53,0 @@

@@ -85,5 +85,2 @@ /**

// settings
var app = this.app;
// allow status / body

@@ -135,3 +132,3 @@ if (2 == arguments.length) {

// TODO: W/ support
if (app.settings.etag && len > 1024) {
if (len > 1024) {
if (!this.get('ETag')) {

@@ -149,2 +146,3 @@ this.set('ETag', etag(body));

this.removeHeader('Content-Length');
this.removeHeader('Transfer-Encoding');
body = '';

@@ -250,3 +248,3 @@ }

* Transfer the file at the given `path`.
*
*
* Automatically sets the _Content-Type_ response header field.

@@ -273,3 +271,3 @@ * The callback `fn(err)` is invoked when the transfer is complete

* , file = req.params.file;
*
*
* req.user.mayViewFilesFrom(uid, function(yes){

@@ -419,7 +417,7 @@ * if (yes) {

* },
*
*
* 'text/html': function(){
* res.send('<p>hey</p>');
* },
*
*
* 'appliation/json': function(){

@@ -437,7 +435,7 @@ * res.send({ message: 'hey' });

* },
*
*
* html: function(){
* res.send('<p>hey</p>');
* },
*
*
* json: function(){

@@ -511,3 +509,3 @@ * res.send({ message: 'hey' });

*
* Aliased as `res.header()`.
* Aliased as `res.header()`.
*

@@ -520,3 +518,3 @@ * @param {String|Object} field

res.set =
res.set =
res.header = function(field, val){

@@ -617,3 +615,3 @@ if (2 == arguments.length) {

* When an application is mounted, and `res.redirect()`
* is given a path that does _not_ lead with "/". For
* is given a path that does _not_ lead with "/". For
* example suppose a "blog" app is mounted at "/blog",

@@ -620,0 +618,0 @@ * the following redirect would result in "/blog/login":

@@ -246,7 +246,13 @@ /**

// ensure all callbacks are functions
callbacks.forEach(function(fn){
if ('function' == typeof fn) return;
throw new Error('Router#' + method + '() requires all callbacks to be functions');
});
// create the route
debug('defined %s %s', method, path);
var route = new Route(method, path, callbacks, {
sensitive: this.caseSensitive
, strict: this.strict
sensitive: this.caseSensitive,
strict: this.strict
});

@@ -253,0 +259,0 @@

{
"name": "express",
"description": "Sinatra inspired web development framework",
"version": "3.0.4",
"version": "3.0.5",
"author": "TJ Holowaychuk <tj@vision-media.ca>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -9,13 +9,11 @@

console.log(express.json());
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.cookieParser('foobar'));
app.use(express.session());
app.get('/\\d+', function(req, res){
res.send('digit ' + req.url);
});
app.get('/', function(req, res){
res.send('hello');
app.get('/\\w+', function(req, res){
res.send('word ' + req.url);
});
app.listen(3000);
console.log('listening on 3000');
console.log('listening on 3000');
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc