Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express

Package Overview
Dependencies
Maintainers
1
Versions
281
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.3 to 3.0.4

9

History.md
3.0.4 / 2012-12-05
==================
* add 'etag' option to disable `res.send()` Etags
* add escaping of urls in text/plain in `res.redirect()`
for old browsers interpreting as html
* change crc32 module for a more liberal license
* update connect
3.0.3 / 2012-11-13

@@ -3,0 +12,0 @@ ==================

1

lib/application.js

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

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

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

25

lib/response.js

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

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

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

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

@@ -246,3 +249,3 @@ this.set('ETag', etag(body));

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

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

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

@@ -415,7 +418,7 @@ * if (yes) {

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

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

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

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

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

@@ -516,3 +519,3 @@ * @param {String|Object} field

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

@@ -613,3 +616,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",

@@ -668,3 +671,3 @@ * the following redirect would result in "/blog/login":

text: function(){
body = statusCodes[status] + '. Redirecting to ' + url;
body = statusCodes[status] + '. Redirecting to ' + encodeURI(url);
},

@@ -671,0 +674,0 @@

@@ -7,3 +7,3 @@

var mime = require('connect').mime
, crc = require('crc');
, crc32 = require('buffer-crc32');

@@ -19,5 +19,3 @@ /**

exports.etag = function(body){
return '"' + (Buffer.isBuffer(body)
? crc.buffer.crc32(body)
: crc.crc32(body)) + '"';
return '"' + crc32.signed(body) + '"';
};

@@ -24,0 +22,0 @@

{
"name": "express",
"description": "Sinatra inspired web development framework",
"version": "3.0.3",
"version": "3.0.4",
"author": "TJ Holowaychuk <tj@vision-media.ca>",
"contributors": [
{ "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" },
"contributors": [
{ "name": "TJ Holowaychuk", "email": "tj@vision-media.ca" },
{ "name": "Aaron Heckmann", "email": "aaron.heckmann+github@gmail.com" },

@@ -13,3 +13,3 @@ { "name": "Ciaran Jessup", "email": "ciaranj@gmail.com" },

"dependencies": {
"connect": "2.7.0",
"connect": "2.7.1",
"commander": "0.6.1",

@@ -19,3 +19,3 @@ "range-parser": "0.0.4",

"cookie": "0.0.5",
"crc": "0.2.0",
"buffer-crc32": "0.1.1",
"fresh": "0.1.0",

@@ -22,0 +22,0 @@ "methods": "0.0.1",

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