41 Commits

Author SHA1 Message Date
jomo
4fdbfb442b use pajk-lwip as a temporary workaround for EyalAr/lwip#297 2017-07-13 13:03:32 +02:00
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
0940b50f2c networking.save_texture should return image buffer, not lwip image object
This led to a crash when a cape or skin was not stored on disk.
The function caled skins.save_image and returned that function's lwip image object instead of the expected buffer.
skins.save_image also no longer returns the image object because it's not used anywhere
2016-02-14 17:04:33 +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
7d02138c1e solve merge conflicts 2015-12-14 01:51:49 +01:00
jomo
3c21a59c94 add support for slim renders, fixes #125, adjust tests 2015-12-13 14:08:59 +01:00
jomo
cb25872498 rewrite renders
- renders are now fully isometric
- used position -0.5 and size +1 at some places to fix #32
- does not support overlay yet
- does not support left/right arms/legs
- does not support slim renders yet
- currently only renders full body, not head
2015-11-22 03:15:41 +01:00
jomo
d307aec221 rename helm to overlay, fixes #127 2015-10-18 15:11:17 +02:00
jomo
f0df78e6a9 allow editing index html when debug_enabled = true 2015-10-14 23:42:27 +02:00
jomo
bf1e26d2c5 get rid of jade/haml, use ejs instead 2015-10-14 01:12:30 +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
b4ae89832a add missing 'cache' import in routes/skins 2015-09-02 23:22:52 +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
Jake
d71d99fa9a Make a vast majority of logs debug, make it so that essential info is in one line 2015-07-16 17:42:41 -05:00
jomo
3e4f150262 add missing import N°2 2015-06-25 21:24:26 +02:00
jomo
fa8e719de3 add missing import 2015-06-25 21:22:54 +02:00
Jake
a2e0edc491 Namespace and move config to root directory, closes #124 2015-06-25 13:12:08 -05:00
Jake
2eb1112c3b Fix render defaults 2015-06-24 15:14:28 -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
4286b35775 support redirection for capes 2015-04-25 22:59:33 +02:00
jomo
c8dad9dfbb invalidate cache when skin file is gone 2015-04-22 00:31:37 +02:00
jomo
3cdcccde57 improve logging 2015-04-22 00:26:10 +02:00
jomo
13169be774 use new response module for capes + more
- made sure that get_cape returns a status
- response.js returns 404 if body is empty
- 'X-Storage-Type: undefined' is no longer returned when status is `null`
2015-04-21 23:27: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
0b0882e63d use new response module for index 2015-04-20 22:19:57 +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