jomo
7f95a34e29
simplify http status codes, update website info
2020-03-29 07:43:23 +02:00
jomo
15a4f17560
add rate limit option for sessionserver
...
any outgoing requests to the sessionserver
that would exceed the configured rate limit are skipped
to prevent being blocked by CloudFront
if a texture hash is cached but outdated, the cache ttl will be bumped
as if the request succeeded, in order to lower requests in the near future
2020-03-29 07:43:23 +02:00
jomo
16948de18d
don't warn about closed connections
2020-03-24 18:50:58 +01:00
jomo
c02d3d33e9
don't respond with 304 on error when debugging is enabled
2016-11-07 04:08:19 +01: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
f088c27012
use '201 Created' when 'status' is 'downloaded'
2016-02-03 02:49:43 +01:00
jomo
29fa734148
remove 'public' part from Cache-Control, not required
2016-01-23 06:26:41 +01:00
jomo
6a5967dfba
downstream caches shouldn't cache server errors, fixes #136
2016-01-20 02:00:10 +01:00
jomo
e7242ce773
respond 304 on server error, fixes #135
2016-01-20 01:50:30 +01:00
jomo
1144b6755a
always use crc32 for etag, much more reliable than mojang skin hash
...
had to make quite a few changes to tests to prevent them from failing
also, etag is now only sent with a 200 response, as defined in RFC7232
2015-12-16 00:47:51 +01:00
jomo
fb0c70d648
return HTTPERROR on 429 or 5xx, fixes #151
...
otherwise 429 or 5xx would be overwriting cached value with null for $config minutes
2015-10-21 01:02:57 +02:00
jomo
d49f7279b3
log response ID first for access log
...
also made sure 'headers' is defined before it's used
2015-09-20 21:45:37 +02:00
jomo
a15cb20144
TooManyRequestsException shouldn't actually throw an error
...
all other errors thrown here are network issues, this is not.
2015-09-20 21:43:12 +02:00
jomo
06895cdd81
add TooManyRequestsException to silent_errors
2015-09-20 21:35:46 +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
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
34f94bf9b5
get rid of redundant config names #124
2015-06-25 21:19:50 +02:00
Jake
a2e0edc491
Namespace and move config to root directory, closes #124
2015-06-25 13:12:08 -05:00
jomo
01049cb34d
rewrite request queue, fixes #118
2015-05-28 00:45:20 +02:00
jomo
6f94af7a4a
log response time
2015-05-07 01:06:56 +02:00
jomo
46d10fdc81
remove unnecessary double check
2015-05-06 21:07:43 +02:00
jomo
ed25d30ff0
remove unnecessary log
2015-05-06 21:07:19 +02:00
jomo
7ca43e3cd9
add description for X-Storage-Type, remove debug log
2015-04-22 00:23:48 +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
0b687d8f8e
correct comment about result.type
2015-04-20 00:52:08 +02:00
jomo
3cbf73b0d7
create new response module & use it for avatars
2015-04-20 00:41:11 +02:00