158 Commits

Author SHA1 Message Date
jomo
29fa734148 remove 'public' part from Cache-Control, not required 2016-01-23 06:26:41 +01:00
jomo
4f667cc99f remove transparency from avatar, fixes #129 2016-01-20 23:44:33 +01:00
jomo
e7242ce773 respond 304 on server error, fixes #135 2016-01-20 01:50:30 +01:00
jomo
74ba828701 add test for uuid -> username skin type update 2016-01-20 01:17:36 +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
caeb9a52fe verbose logging on travis 2015-12-15 21:09:13 +01:00
jomo
5cb20b1105 add more crc values to tests 2015-12-14 01:59:32 +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
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
d307aec221 rename helm to overlay, fixes #127 2015-10-18 15:11:17 +02:00
jomo
b0f50cbed0 print base64 encoded body if CRC does not match 2015-10-13 00:51:03 +02:00
jomo
8b2ccf3368 add new CRC checksums
updated OS X + cairo, so obviously the checksums change, right? right??
2015-10-13 00:50:25 +02:00
jomo
7714e0e0ef add case sensitive default URL tests, so 06caf589abfc4f7a552714558ac5f78abddeeabb won't happen again 2015-09-30 21:06:16 +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
c8d74d47be avoid reserved property names (+ test), fixes #145 2015-09-25 19:24:56 +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
9cdca6acda don't throw strings 2015-09-20 21:28:43 +02:00
jomo
6a630f23b9 add new test CRCs for @6d12ed6 2015-09-06 00:47:17 +02:00
jomo
3a61e15abf various networking.js improvements
- cleaned up some messy if/else code, replaced with nicely readable switch/case
- catch JSON.parse errors
2015-08-31 00:10:35 +02:00
jomo
755cc74170 don't update file dates
this was originally implemented because we wanted to delete the oldest images on disk
where 'oldest' means not *used* for the longest time

that's not useful and was never actually implemented, so we don't need this
2015-08-30 04:48:50 +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
7e8c65fb33 Add tests for invalid URL paths, closes #123 2015-07-16 17:31:20 -05:00
jomo
72840433cb use proper URL encoding in tests 2015-06-25 21:55:23 +02:00
jomo
d56b10955e add tests for uuid defaults, #115 2015-06-25 21:46:14 +02:00
jomo
8c022e5cb6 'useranme' 2015-06-25 21:34:15 +02:00
jomo
f9b7ffb5b7 fix redirection test 2015-06-25 21:33:47 +02: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
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
jomo
288657107e actually store the skin in store_skin, fixes #108; pipe skins & capes through lwip before saving, fixes #121 2015-05-28 01:32:29 +02:00
jomo
679e72759a fix test for TooManyRequests 2015-05-28 01:05:24 +02:00
jomo
0ec97e9ba1 add alternative checksum for mojang capes 2015-05-28 00:52:26 +02:00
jomo
11f580bb95 fix TooManyRequests test 2015-05-28 00:45:48 +02:00
jomo
189698bed9 add alternative checksums for steve & alex
using the latest version of lwip, the images don't have an alpha channel anymore

apparently before @94322f3 npm thought 'crafatar/lwip' means git tag v0.0.5
and after that commit, using 'EyalAr/lwip' it noticed there's a v0.0.6

...
...
...

wat.
2015-05-27 23:28:54 +02:00
jomo
7f8da3abe2 lint tests 2015-05-27 22:35:59 +02:00
jomo
bb4de15ff2 no yoda
usually, '10 === finished' would be considered yoda
but in this case, with this naming of variables
it makes a lot more sense this way
2015-05-26 22:21:07 +02:00
jomo
c93ffa5a79 add test for simultaneous requests 2015-05-26 22:16:33 +02:00
jomo
5ef3c4f59c add test for URL encoding 2015-05-26 21:53:33 +02:00
jomo
fd6fd0f1bd fix bulk.sh script 2015-05-25 14:13:09 +02:00
jomo
9c5e5ff9a7 shuffle ids for bulk.sh
this requires gshuf (coreutils) to be installed on OS X
2015-05-24 16:55:04 +02:00
jomo
6273e3bcc8 adjust 422 messages 2015-05-06 22:13:28 +02:00
jomo
00f6c28cfc add tests for 422 / invalid xy / user error 2015-05-06 22:11:19 +02:00
jomo
d1e174405a fix wrong URL in test 2015-05-06 21:59:44 +02:00
jomo
15afa940f0 update lwip for iojs 2.0.0 2015-05-06 21:50:57 +02:00
jomo
9f04fbc136 allow multiple checksums for tests, fixes #119
As discussed in #119, the rendered image can be slightly different in different environments
2015-05-06 21:06:09 +02:00
jomo
b039e97fa7 fix test crc32 values 2015-05-03 23:06:21 +02:00
jomo
6e41423b7a set encoding: null in test HTTP requests
from the 'request' docs:

encoding: Encoding to be used on setEncoding of response data. If null, the body is returned as a Buffer. Anything else (including the default value of undefined) will be passed as the encoding parameter to toString() (meaning this is effectively utf8 by default).
2015-05-03 22:46:03 +02:00