1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-01-13 19:56:40 +00:00
Commit graph

23 commits

Author SHA1 Message Date
ae283b6c96 Version bump to 0.2.0 2017-06-02 22:15:41 +01:00
9cda58d0c0 Rename tawashi to duckbin.
The library that used to be "tawashi_implem" now
is simply called tawashi.
2017-06-02 21:53:27 +01:00
2f00014758 Fail if CONTENT_TYPE is not application/x-www-form-urlencoded.
As part of the partial improvement to the POST reading
code I also added a max_post_size setting which defaults
to 1 MiB. POST inputs longer than that size get truncated.
This is separate to max_pastie_size, which is just the
size of one of the values in the POST data.
2017-06-02 09:23:35 +01:00
4e32006e08 Don't respond if the request method is unexpected.
This includes the jolly responder, which now only works
for GET requests.
2017-05-24 19:09:42 +01:00
1507c79503 Clean up and make a separate class for pasties from curl-style requests. 2017-05-24 09:05:03 +01:00
8b94672b25 Register a separate maker for requests to "" POST. 2017-05-23 19:59:49 +01:00
27881ed0f0 Allow registering makers specific to POST or GET requests. 2017-05-23 19:59:49 +01:00
2571e70093 Allow to give the css file for the highlighter in tawashi.ini 2017-05-23 18:31:55 +01:00
e2437a6b12 Add more logging and error checking. 2017-05-22 09:27:17 +01:00
34daf8e411 Decompose the base_uri option.
This allows support for having tawashi in a subdirectory
of your domain, eg http://example.com/tawashi
2017-05-19 10:01:22 +01:00
8345c300a8 Add some debug logging and change level to trace. 2017-05-16 19:14:22 +01:00
ed4a02f4bb Setup the logger based on the log_file setting in tawashi.ini.
With this change I had to swap the order in which what settings
file as being loaded and the initialization of the logger itself.
This is because the logger now depends on the settings file,
so it can't be used before the setting file got parsed.
2017-05-16 19:11:09 +01:00
32eadfc64d Pull some code out from main(). 2017-05-16 18:52:34 +01:00
9b28b2d274 Add a --show-paths switch to print hardcoded paths and info. 2017-05-15 09:26:29 +01:00
4d31323bb1 Redirect to error.cgi when saving fails.
Not working yet, still getting there.
2017-05-12 22:46:54 +01:00
73707c2ad0 Revert "Pass the ResponseFactory object down to the Response itself."
This reverts commit 3bc6c56c03.
2017-05-12 22:18:03 +01:00
3bc6c56c03 Pass the ResponseFactory object down to the Response itself. 2017-05-12 09:36:01 +01:00
f286507edf Delay fast subsequent pasties from the same IP. 2017-05-11 18:50:56 +01:00
9e63a648a1 Protect against fast flooding from the same ip. 2017-05-11 09:48:18 +01:00
07135f215c Delete get_env, which confused me a lot.
Get raw environment variables directly from main().
Add code to split on '=' in cgi_environment_vars and only pick
the ones that are interesting, just as before.
2017-05-08 19:46:14 +01:00
df384f5128 Add unit test for IndexResponse. 2017-05-06 21:49:46 +01:00
cd1be59cfa Pass the output stream and cgi_env to Response.
Mask the fact that they are globals, because I need
to be able to pass different classes in order to be
able to write unit tests for response classes.
2017-05-06 19:48:44 +01:00
e1687c96ff Split tawashi into lib+executable to enable unit testing 2017-05-04 19:52:18 +01:00