Files
node/doc/api
James M Snell 6192c9892f http: add checkIsHttpToken check for header fields
Ref: https://github.com/nodejs/node-convergence-archive/issues/13

This adds a new check for header and trailer fields names and method
names to ensure that they conform to the HTTP token rule. If they do
not, a `TypeError` is thrown.

Previously this had an additional `strictMode` option that has been
removed in favor of making the strict check the default (and only)
behavior.

Doc and test case are included.

On the client-side
```javascript
var http = require('http');
var url = require('url');
var p = url.parse('http://localhost:8888');
p.headers = {'testing 123': 123};
http.client(p, function(res) { }); // throws
```

On the server-side
```javascript
var http = require('http');
var server = http.createServer(function(req,res) {
  res.setHeader('testing 123', 123); // throws
  res.end('...');
});
```

Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Trevor Norris <trevnorris@nodejs.org>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
PR-URL: https://github.com/nodejs/node/pull/2526
2015-09-25 08:37:57 -07:00
..
2015-08-04 11:56:14 -07:00
2015-08-04 11:56:14 -07:00
2015-04-11 06:47:30 +02:00
2015-08-23 17:59:43 -04:00
2015-08-23 17:59:43 -04:00
2010-11-07 17:22:56 -08:00
2015-06-05 22:58:14 -04:00
2015-09-16 10:29:13 -07:00
2015-08-23 17:59:43 -04:00
2015-03-13 23:14:20 +01:00
2015-08-23 17:59:43 -04:00