Commit graph

26 commits

Author SHA1 Message Date
Emi Tatsuo 7dff9674b6
Removed some unused imports 2020-12-07 15:59:43 -05:00
Emi Tatsuo f98b94235a
Cranking out some docs
Not finished yet we've got so many docs to write.  It's doc writing time!
2020-12-05 14:09:16 -05:00
Emi Tatsuo f592ecf73b
Move opt_timeout to lib.rs 2020-12-03 15:04:12 -05:00
Emii Tatsuo f922f8c70d
Merged Meta, Status, and ResponseHeader into Response 2020-12-01 16:36:29 -05:00
Emii Tatsuo 86ed240761
Remove dependancy on mime when serve_dir is off 2020-11-30 21:26:25 -05:00
Emi Tatsuo 16721a7321
Merge several pending changes into a virtual master
Octopus merges are just a cheap trick to make weak branches stronger
2020-11-24 23:04:26 -05:00
Emi Tatsuo c3d7381860
Added a static handler type. Impl AsRef<Body> for Response
im so tired i havent slept enough in so long but also i havent done any productive work like do you think im using this project as an excuse or like a bad coping mechanism for my mental health or something like that cause thats what its starting to feel like
2020-11-23 23:34:11 -05:00
Emi Tatsuo 7990739884
Move the handler type to it's own mod, change to an enum
The new enum can be converted to from anything that could previously be passed to
add_route, so this is not a breaking change.  If fact, from the end user's perspective,
nothing changed, but internally, this gives us a lot of potential as far as having
multiple types of routes.
2020-11-23 11:55:40 -05:00
Emi Tatsuo 48c0783e36
Improve error handling for serve_dir
Specifically:
 - Serve NOT_FOUND when file or directory doesn't exist
 - Serve NOT_FOUND and warn in log when permission denied for file or directory
 - Serve SERVER_ERROR and warn in log when permission denied or not found for path to serve from
 - Serve SERVER_ERROR and warn in log with a link to the GH if an unexpected error happens
2020-11-23 09:39:45 -05:00
Emi Tatsuo 71c1ac0fab
Fix serve_dir feature 2020-11-23 08:44:45 -05:00
Emi Tatsuo 5612ce1085
Removed unnecessary dependency on futures-rs 2020-11-19 23:51:25 -05:00
panicbit 46ab84ba04 streamline send_response 2020-11-19 19:34:48 +01:00
Emi Tatsuo c69cf49d99
Removed over-zeleous feature gating 2020-11-19 11:31:10 -05:00
Emi Tatsuo 475db6af79
Adapted a type from futures-util allowing us to drop the dep and remove a big chunk of the dep tree 2020-11-19 11:09:53 -05:00
Emi Tatsuo 753ecf708d
Isolate directory serving methods behind feature, incl mime_guess. Remove itertools 2020-11-19 02:49:41 -05:00
panicbit 5a92d8d28f use mime_guess for guessing mime 2020-11-18 23:00:46 +01:00
Emi Tatsuo 6a78b2f31a
Added Response::success_with_body 2020-11-17 21:41:18 -05:00
panicbit 987621cca9 support gmi extension when guessing mime types
Closes #12
2020-11-15 22:03:50 +01:00
panicbit 46077739b3 document some Document methods 2020-11-15 07:01:38 +01:00
panicbit 0425bf2cf3 add Cowy util trait 2020-11-14 22:46:29 +01:00
panicbit 0c05d6d162 implement document API 2020-11-14 09:55:21 +01:00
panicbit bfb6282a9b improve error messages 2020-11-14 03:58:57 +01:00
panicbit af614a06aa reduce number of functions that return Result 2020-11-14 01:55:47 +01:00
panicbit 9b9955827d introduce GEMINI_MIME static 2020-11-14 00:48:50 +01:00
panicbit b97c7a6f12 rename GEMINI_MIME to GEMINI_MIME_STR 2020-11-14 00:27:41 +01:00
panicbit acef45c75c init 2020-10-31 20:53:03 +01:00