84470cfc57
Add a host_path token to mustache.
...
It expands to the host_path setting in the ini file, with
the last slash removed if present. Use it to make absolute
links like {{host_path}}/tawashi.css.
2017-05-28 17:06:14 +01:00
847988f4bd
No need to prepare mustache context if no body is required.
2017-05-23 20:24:56 +01:00
27881ed0f0
Allow registering makers specific to POST or GET requests.
2017-05-23 19:59:49 +01:00
54d50cf6bc
Basic check to tell if a string looks like a possibly valid number.
2017-05-22 21:04:26 +01:00
51810fa2f2
Always remove the trailing slash from computed URI.
2017-05-22 20:32:20 +01:00
e84e968ff6
Remove unused property.
2017-05-19 10:01:36 +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
810c321515
Redirects always use 3xx status codes.
2017-05-18 22:38:09 +01:00
c6955cd8b9
Heineus bug fixed.
2017-05-18 20:19:50 +01:00
aaa28d3454
Assign the actual numbers to the HTTP status codes enum.
...
This allows me to get rid of a good deal of crap.
2017-05-18 19:17:22 +01:00
cdd23d35d0
Make on_process() return an HttpHeader.
...
Response type is now decided by on_process' return value.
2017-05-18 19:17:22 +01:00
c5f2bc055a
Append the protocol to the uri from the code.
...
This means if you set uri name to http://example.com in the
config file you will actually get base_uri to be
http://http://example.com .
2017-05-18 19:17:22 +01:00
59a5d35ee0
Try to fix redirect not working properly.
2017-05-17 00:03:43 +01:00
85f6781d81
Fix tawashi sending back an html response even for redirects.
2017-05-16 22:58:09 +01:00
f19d78222f
Clarify log entry
2017-05-16 22:16:33 +01:00
75bd68c53e
More logging
2017-05-15 23:47:01 +01:00
34c23659e9
Log files that mustache is trying to open as info.
2017-05-15 23:45:13 +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
10da75caf5
Remove parameters from Response's constructor.
...
They can safely be defaulted and derived classes can
change their preferences later inside their constructor
if they need to.
2017-05-12 09:18:49 +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
8980a1d1ff
I don't really need to store the page name in the base class.
2017-05-06 19:16:57 +01:00
e1687c96ff
Split tawashi into lib+executable to enable unit testing
2017-05-04 19:52:18 +01:00