jomo
f1f3ba6709
use response.js for all responses
...
results in:
1) less duplicated code
2) default response headers being used at all times
3) *all* requests being logged properly
- adds documentation for result.code
- allows using result.code to override HTTP 500
- uses response.js for too-busy, server error, method not allowed
2016-11-07 03:59:07 +01:00
jomo
57115202d2
don't rely on hasOwnProperty to exist
...
from MDN:
JavaScript does not protect the property name hasOwnProperty; thus, if the possibility exists that an object might have a property with this name, it is necessary to use an external hasOwnProperty to get correct results
2016-11-04 16:19:12 +01:00
jomo
96b277b806
add missing documentation
2016-02-19 19:24:27 +01:00
jomo
9ccb0151bc
don't search/replace username in path
...
fixes faulty URLs when part of the path is used as username (e.g. 'avatars')
2016-01-20 01:28:54 +01:00
jomo
b9f6a21942
ignore case when checking for mhf_alex or mhf_steve
2016-01-20 00:12:53 +01:00
jomo
d307aec221
rename helm to overlay, fixes #127
2015-10-18 15:11:17 +02:00
jomo
06caf589ab
don't lowercase default URLs
2015-09-30 17:00:52 +02:00
jomo
83defa6885
make default parameter case insensitive, add missing docs to renders
...
See #142
2015-09-30 00:52:51 +02:00
jomo
ecfec6a407
use MHF_Steve and MHF_Alex instead of steve and alex in default parameter
...
See #142 (not fixed by this commit!)
Basically, this just adds mhf_steve and mhf_alex as special cases for the default parameter only
2015-09-30 00:38:32 +02:00
jomo
26f6b089ef
log errors only once, fixes #140
...
also made sure some (network) errors have level 'WARN'
these are printed without stacktrace
2015-09-20 21:17:13 +02:00
jomo
607dcaf6e5
use status -2 for 404s
...
human_status (response.js) defines code -2 as 'user error'. 404 is definitely a user error, so using that makes sense.
eventually we should change the whole status code thing with #120
2015-07-17 10:09:34 +02:00
Jake
b1cdf61e4b
Change invalid request path to be a 404 rather than 422, implement status id in response module
2015-07-16 17:48:48 -05:00
jomo
3e4f150262
add missing import N°2
2015-06-25 21:24:26 +02:00
Jake
a2e0edc491
Namespace and move config to root directory, closes #124
2015-06-25 13:12:08 -05:00
Jake
d2ab7b87ad
Fix tests with new default code
2015-06-24 15:08:05 -05:00
Jake
8c39d0c017
Add support for userIds as defaults, ccloses #115
2015-06-24 01:23:22 -05:00
Jake
f1fd92f1cf
Disallow additional paths, closes #123
2015-06-24 00:50:38 -05:00
jomo
6273e3bcc8
adjust 422 messages
2015-05-06 22:13:28 +02:00
jomo
3cdcccde57
improve logging
2015-04-22 00:26:10 +02:00
jomo
8971e3c02b
use new response module for renders + bug fixes
2015-04-21 00:57:14 +02:00
jomo
a947b02c87
use new response module for skins
2015-04-20 23:18:27 +02:00
jomo
d025a3004d
remove always-empty first entry in req.url.path_list
...
rhyme pro 😎
2015-04-20 01:10:39 +02:00
jomo
3cbf73b0d7
create new response module & use it for avatars
2015-04-20 00:41:11 +02:00
jomo
fce58722c8
start work on #45
2015-04-12 19:53:34 +02:00
jomo
9d2fe0c454
some logging fixes
2015-04-06 03:32:13 +02:00
jomo
b84a65fd8e
restructure directories
...
www.js is our 'main' file, it's now at the project's root instead of server.js
routes, views, assets are now in lib, too
2015-04-06 03:06:38 +02:00