Commit Graph

37 Commits

Author SHA1 Message Date
Douglas Christopher Wilson
eaf3318dd3 Generate ETags for all request responses
closes #2546
2015-02-18 00:12:28 -05:00
Douglas Christopher Wilson
4d1ee23f84 Use etag module to generate ETag headers 2014-10-18 00:53:17 -04:00
Yad Smood
544c6665f5 Fix res.send(status, num) to send num as json
fixes #2226
2014-07-10 23:19:57 -04:00
Douglas Christopher Wilson
c21226aa7c improve etag control for res.send
closes #1435
closes #2129
2014-05-30 21:02:21 -04:00
Douglas Christopher Wilson
3e358458f4 tests: add more etag tests 2014-05-30 19:51:32 -04:00
Douglas Christopher Wilson
8ab96ab80d mark res.send ETag as weak and reduce collisions 2014-05-29 23:14:21 -04:00
Douglas Christopher Wilson
f14e39d451 set proper charset in content-type for res.send
This will write strings to sockets with an explicit "utf8" encoding
(which is the default) and will override the charset in the
Content-Type so it properly relfects the encoding of the response.

closes #1631
closes #2092
2014-05-21 01:31:08 -04:00
Jonathan Ong
328c6d3060 remove unnecessary test/support/http
backport of 643397ed21
2014-05-18 00:57:54 -04:00
Jonathan Ong
55d1a4f964 always send ETag when content-length > 0
closes #1780
2013-10-30 20:34:16 -07:00
TJ Holowaychuk
6cf6c8b918 Revert "remove charset from json responses. Closes #1631"
This reverts commit 138d74aefa.
2013-08-27 13:48:18 -07:00
Max Riveiro
54a192a5c5 Add application setting to disable ETag completely 2013-07-21 12:49:28 +04:00
TJ Holowaychuk
138d74aefa remove charset from json responses. Closes #1631 2013-06-05 11:51:59 -07:00
TJ Holowaychuk
3296ed9cb3 change generation of ETags with res.send() to GET requests only. Closes #1619
if for some reason this is not ideal for your use-case please let me know and comment in the issue
2013-05-10 14:43:59 -07:00
Alex Weeks
a1e42ac33f Explicitly remove Transfer-Encoding header from 204 and 304 responses
Per RFC 2616 §10.3.6 & §10.2.5 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html) "The [204/304] response MUST NOT contain a message-body, and thus is always terminated by the first empty line after the header fields."
2012-12-19 10:53:17 -08:00
TJ Holowaychuk
9bd86cdddc Revert "add 'etag' option"
This reverts commit 6f6eec7d8d.
2012-12-06 15:15:49 -08:00
Max Riveiro
6f6eec7d8d add 'etag' option 2012-12-05 16:49:09 -08:00
TJ Holowaychuk
f0d5b3b368 remove non-primitive string support for res.send()
kinda silly.. valueOf() before if you happen to use
boxed strings, otherwise it is unfair that dont support
other boxed primitives all over, and quite frankly no one does
2012-09-26 09:04:26 -07:00
TJ Holowaychuk
a6caa267bd add res.jsonp(). Closes #1307
this also removes the jsonp
2012-08-30 09:29:43 -07:00
TJ Holowaychuk
cdb3e9dc0d fix etag quoting. Closes #1310 2012-08-30 08:49:48 -07:00
TJ Holowaychuk
0f5560eebd updated tests to use "supertest" 2012-06-26 17:14:07 -07:00
TJ Holowaychuk
3c0c96114f Added res.send(body, status) support back for backwards compat 2012-06-21 16:37:26 -07:00
TJ Holowaychuk
108e66c24b Fixed res.send() freshness check, respect res.statusCode 2012-06-15 15:42:46 -07:00
TJ Holowaychuk
640cf4ca21 Changed: res.send() always checks freshness 2012-06-15 11:38:51 -07:00
TJ Holowaychuk
579a1be7c8 Added res.send() If-None-Match test 2012-04-28 20:02:38 -07:00
TJ Holowaychuk
c0a68fcd0d Added Buffer ETag support to res.send() 2012-04-28 20:00:30 -07:00
Pierre Matri
22668555ad Fixed req.send tests for string objects 2012-04-22 14:06:13 +02:00
Pierre Matri
0f585931a4 Make string object behave like string literals with res.send 2012-04-22 13:49:50 +02:00
TJ Holowaychuk
76fd462bcc Removed res.header(field, value) 2012-02-07 08:30:27 -08:00
Tj Holowaychuk
b756474d9d Added res.send() HEAD tests 2011-11-08 17:46:08 -08:00
Tj Holowaychuk
b0c9209726 Added res.send() 304 / 204 tests 2011-11-08 17:44:05 -08:00
Tj Holowaychuk
d0d721d80b Added res.send(Object) test 2011-11-08 17:40:20 -08:00
Tj Holowaychuk
7b50a78662 Added res.send(null || undefined) tests 2011-11-08 17:38:18 -08:00
Tj Holowaychuk
aa869c637a Added res.send() content-type tests 2011-11-08 17:36:24 -08:00
Tj Holowaychuk
f467fe1cbf Added res.send(Buffer) test 2011-11-08 17:34:04 -08:00
Tj Holowaychuk
15fd639cd9 Added res.send(String) test 2011-11-08 17:32:58 -08:00
Tj Holowaychuk
f96f2cf56e Added res.send(code, body) test 2011-11-08 17:31:51 -08:00
Tj Holowaychuk
b0f6278cea Added res.send(code) test 2011-11-08 17:30:29 -08:00