Commit Graph

186 Commits

Author SHA1 Message Date
Douglas Christopher Wilson
2cccbc186e add deprecation message to non-plural req.accepts* 2014-06-23 16:17:44 -04:00
Guy Ellis Monster
746044b6c2 Replace __defineGetter__ with Object.defineProperty
closes #2162
2014-06-22 12:02:33 -04:00
Douglas Christopher Wilson
097cd0c242 Merge tag '3.7.0' 2014-05-18 11:21:30 -04:00
Douglas Christopher Wilson
566720be15 improve proxy trust with ip address list
closes #2099
2014-05-17 20:02:20 -04:00
Douglas Christopher Wilson
65f13c3cc6 update connect to 2.16.1 2014-05-17 14:30:52 -04:00
Douglas Christopher Wilson
2901bd6916 Merge branch '3.5.x' into 4.1.x 2014-05-08 14:01:02 -04:00
Douglas Christopher Wilson
c99fa6a192 Fix req.host for IPv6 literals
fixes #2102
2014-05-07 14:08:08 -04:00
agchou
13475977af some code cleanup 2014-03-25 15:23:04 -07:00
Jonathan Ong
68996d7561 remove req.auth 2014-03-09 19:45:43 -07:00
Jonathan Ong
7693aa5464 use parseurl 2014-03-07 18:27:26 -08:00
Jonathan Ong
3cf7b2e39e refactor to use basic-auth 2014-03-07 16:18:51 -08:00
Jonathan Ong
5572897998 some jshint cleanup
some more errors but whatever
2014-03-05 22:24:35 -08:00
Roman Shtylman
1396e0855d remove last pieces of connect dependency
- copy over patch.js to shim ServerResponse
- bundle `static` middleware
2014-02-22 09:26:29 -05:00
Roman Shtylman
6a7363e4ae use local copy of parseUrl 2014-02-22 09:26:29 -05:00
Jonathan Ong
cec0c06a70 refactor req.is and req.accepts* 2014-01-03 02:50:09 -08:00
Greg Methvin
3ddd8e66a7 Make req.accepts take an argument list 2013-08-16 15:19:33 -07:00
TJ Holowaychuk
19d685b152 return actual booleans from req.accept* functions 2013-06-06 13:47:18 -07:00
TJ Holowaychuk
8ab44081d4 add support for multiple X-Forwarded-Proto values. Closes #1646 2013-06-05 12:05:45 -07:00
TJ Holowaychuk
8559c0e2a4 fix req.subdomains when no Host is present 2013-05-09 09:10:52 -07:00
TJ Holowaychuk
06ead58240 fix req.host when no Host is present, return undefined 2013-05-09 09:06:11 -07:00
TJ Holowaychuk
2e53cb72ec add req.acceptsEncoding(name) 2013-04-12 12:56:50 -07:00
TJ Holowaychuk
3b1597d79e add req.acceptedEncodings 2013-04-12 12:55:53 -07:00
Pavel Brylov
9e684d45bc add support for custom Accept parameters 2013-04-11 08:34:10 -07:00
TJ Holowaychuk
d1bafa0685 docs 2013-04-03 15:11:58 -07:00
TJ Holowaychuk
4a1fa58704 refactor req.host 2013-04-01 11:09:23 -07:00
Candid Dauth
b686ec1182 Considering X-Forwarded-Host header if proxy is trusted 2013-03-31 01:28:34 +01:00
TJ Holowaychuk
e3ac2c5b02 change req.subdomain styling back 2013-01-23 20:11:14 -08:00
TJ Holowaychuk
cd54faa4af move "subdomain offset" defaulting to config 2013-01-23 20:10:29 -08:00
Greg Methvin
ba00e23630 Add subdomain offset setting
Add a setting "subdomain offset" for the app, which can be used to
change the behavior of req.subdomains. This is useful when our "base"
domain contains more than two parts, e.g. example.co.uk, and also
when we are running locally with domains like xxx.local.

The default behavior is still to return all but the last two parts.
2013-01-20 19:27:58 -08:00
Greg Methvin
17bf04d1ef Allow colons in passwords for req.auth
Passwords in basic auth can contain colons (as per RFC2617), while
usernames cannot, so assume everything after the colon is a password.
This makes req.auth return the correct value if the user uses a colon
in his password.
2013-01-06 03:02:40 -05:00
TJ Holowaychuk
d6cb449011 add "Basic" check to req.auth 2012-10-19 11:46:46 -07:00
TJ Holowaychuk
7bf4ad30fc add req.auth test coverage 2012-10-19 11:44:44 -07:00
TJ Holowaychuk
b400814d00 Added req.auth
tests to come
2012-06-22 16:25:31 -07:00
TJ Holowaychuk
8f4cd13c89 docs 2012-06-17 19:00:41 -07:00
TJ Holowaychuk
7bfb58920a docs 2012-06-17 18:08:35 -07:00
TJ Holowaychuk
2e324ccf5f docs 2012-06-17 18:08:14 -07:00
TJ Holowaychuk
1a10ee76b3 update range-parser dep 2012-06-17 18:06:04 -07:00
TJ Holowaychuk
619e6349f6 ws 2012-06-17 17:48:52 -07:00
TJ Holowaychuk
b1ff68548f add inline range example 2012-06-17 17:41:28 -07:00
TJ Holowaychuk
376b6c3bad add note about inclusive ranges 2012-06-17 17:37:42 -07:00
TJ Holowaychuk
f4c8a59b17 Added req.range(size) 2012-06-17 17:33:05 -07:00
TJ Holowaychuk
c10223b803 GET / HEAD only for req.fresh 2012-06-15 16:09:32 -07:00
TJ Holowaychuk
d073e0aeb5 Added 2xx / 304 check to req.fresh 2012-06-15 16:03:20 -07:00
TJ Holowaychuk
f895516a2c Added fresh dep 2012-06-10 12:21:03 -07:00
TJ Holowaychuk
895673141d Fixed: expose connects mime module. Cloases #1165 2012-06-08 09:47:13 -07:00
TJ Holowaychuk
2b90cd7d51 Added req.host 2012-06-05 19:24:49 -07:00
TJ Holowaychuk
d5fde6a4b9 added test to illustrate req.params as an array 2012-06-05 19:02:28 -07:00
TJ Holowaychuk
99b2e0fa08 refactored req.param() 2012-06-05 18:59:26 -07:00
TJ Holowaychuk
ebcb1ca90e Changed req.param() to check route first
body / query-string taking precedence is a little sketchy
but you should use this method sparingly, think of it
as PHPs $_REQUEST
2012-06-05 18:51:42 -07:00
TJ Holowaychuk
908e467548 docs 2012-06-02 20:04:51 -07:00
TJ Holowaychuk
910dae16ab misc refactor 2012-05-29 18:51:08 -07:00
TJ Holowaychuk
d84d0b69ef Added req.ip 2012-05-29 18:46:07 -07:00
TJ Holowaychuk
b694ba27be Changed: dont reverse req.ips
parse them as-is. im impartial about
the ordering but this spares some CPU. if you
prefer the other way let me know
2012-05-29 18:41:00 -07:00
TJ Holowaychuk
e3cbac2d77 Fixed setting check for req.ips 2012-05-29 18:36:46 -07:00
TJ Holowaychuk
d9aea70ccc removed file heading comments 2012-05-03 08:43:42 -07:00
TJ Holowaychuk
a376980a69 update headers 2012-04-25 21:49:43 -07:00
TJ Holowaychuk
8f8740028c Fixed: use app.get() for all core settings 2012-04-25 21:40:53 -07:00
TJ Holowaychuk
18a6bbfd80 docs 2012-04-25 17:59:02 -07:00
TJ Holowaychuk
73092c9898 Perf: memoize parsed urls 2012-04-25 16:12:40 -07:00
TJ Holowaychuk
b5cee82604 doc typo 2012-04-18 17:42:13 -07:00
TJ Holowaychuk
27b1b5e3b3 docs 2012-04-16 08:53:16 -07:00
TJ Holowaychuk
5fa2f89542 Added res.header() and req.header() aliases for BC 2012-04-16 08:31:30 -07:00
TJ Holowaychuk
7e81cad0bf Added new dox API docs 2012-04-15 21:01:17 -07:00
TJ Holowaychuk
abe5cc7184 populate changelog 2012-04-15 11:40:31 -07:00
TJ Holowaychuk
54c3d5c113 reverse req.ips array 2012-03-29 16:39:32 -07:00
TJ Holowaychuk
6d0f9a37a2 req.ipds doesnt need "trust proxy"
not really anyway, if you use this
you better trust it :)
2012-03-29 16:36:36 -07:00
TJ Holowaychuk
dd468fbe9a Added req.ips 2012-03-29 16:26:59 -07:00
TJ Holowaychuk
04ecf04832 Added X-Forwarded-Proto support to req.secure 2012-03-29 16:17:44 -07:00
TJ Holowaychuk
ba570a9842 typo 2012-03-24 11:42:26 -07:00
TJ Holowaychuk
365a98d00f docs 2012-03-24 11:39:47 -07:00
TJ Holowaychuk
4e2677fe2c docs 2012-03-24 11:37:26 -07:00
TJ Holowaychuk
e4827b8d89 more docs for req.accepts(arr) 2012-03-23 18:03:19 -07:00
TJ Holowaychuk
298899d02c Added array support. Closes #1053 2012-03-23 17:58:41 -07:00
TJ Holowaychuk
4e332452b7 Added req.subdomains 2012-02-22 16:36:13 -08:00
TJ Holowaychuk
85d6964874 Removed req.header(field) 2012-02-07 08:32:08 -08:00
TJ Holowaychuk
fe27989a69 doc typo 2012-02-07 08:25:40 -08:00
TJ Holowaychuk
b04f3eeede refactored req.xhr 2012-02-07 08:24:58 -08:00
TJ Holowaychuk
6ab61d023f docs 2012-02-07 08:21:32 -08:00
TJ Holowaychuk
4d87efc771 Added "trust proxy" setting 2012-02-07 08:19:30 -08:00
TJ Holowaychuk
8c2c1240e1 removed old req.get() for now 2012-02-07 04:50:00 -08:00
TJ Holowaychuk
27e696b7b1 Added req.get() alias of req.header() 2012-02-07 04:49:12 -08:00
TJ Holowaychuk
bfba98f532 Removed req.header() defaultValue support 2012-02-07 04:47:51 -08:00
TJ Holowaychuk
2ba343d2b5 Added req.protocol() 2012-02-07 04:39:10 -08:00
TJ Holowaychuk
edfe50e713 Removed app.is() support 2011-12-30 15:10:51 -08:00
TJ Holowaychuk
26fb403ced Fixed req.is() with charsets 2011-12-30 15:04:41 -08:00
TJ Holowaychuk
014fb46449 Added req.is() tests 2011-12-30 15:01:34 -08:00
Tj Holowaychuk
5757f875f2 Added X-Forwarded-Proto support to res.redirect(). Closes #927 2011-12-08 12:45:46 -08:00
Tj Holowaychuk
e49c482a3f req.body takes precedence 2011-12-07 08:41:22 -08:00
Tj Holowaychuk
28f32b9b8e Removed req.notify() 2011-11-24 15:12:25 -08:00
TJ Holowaychuk
9c7380efe4 Added req.acceptsLanguage() 2011-11-20 12:53:01 -08:00
TJ Holowaychuk
5e071a2e4b Added req.acceptsCharset() 2011-11-20 12:51:27 -08:00
TJ Holowaychuk
ff9b82c4f6 todo 2011-11-20 12:44:25 -08:00
TJ Holowaychuk
a0d0ac6cff docs 2011-11-20 12:43:06 -08:00
TJ Holowaychuk
b605a5de87 Changed: req.accepts() utilizing utils.accepts() 2011-11-20 12:42:06 -08:00
TJ Holowaychuk
499d3d6d78 Added req.acceptedCharsets 2011-11-19 22:16:16 -08:00
TJ Holowaychuk
e8c373694c Added req.acceptedLanguages 2011-11-19 22:12:09 -08:00
TJ Holowaychuk
a8fd8cb645 Added req.accepted 2011-11-19 22:08:26 -08:00
Tj Holowaychuk
d249868e07 no longer manipulate the req/res protos directly 2011-11-10 11:18:43 -08:00
Tj Holowaychuk
1a5636b199 case sensitivity test 2011-11-08 20:29:48 -08:00
Tj Holowaychuk
af46df7eae Removed req.isXMLHttpRequest
let me know if you actually use this :)
2011-11-08 20:28:55 -08:00