Emii Tatsuo
4ba099f947
Outsource document building to the gemtext crate
...
This change is still pending on some of my PRs being merged to main in the gemtext repository. Please see:
=> https://tulpa.dev/cadey/maj/pulls/12 Add conversion traits to Builder
=> https://tulpa.dev/cadey/maj/pulls/13 Add a `blank_line()` method to `Builder`
=> https://tulpa.dev/cadey/maj/pulls/14 Accept an Option<&str> as a link name
=> https://tulpa.dev/cadey/maj/pulls/15 Add support for alt-text in preformatted blocks
Once these changes are merged, the dependency on gemtext should be moved to the crates.io version
2020-11-30 14:27:58 -05:00
Emii Tatsuo
9aa90c3e59
Fix conflicts with main branch
2020-11-30 00:31:30 -05:00
Emii Tatsuo
a1d52faa9d
Fix examples
2020-11-30 00:28:26 -05:00
panicbit
0af7243517
Merge pull request #34 from Alch-Emi/improve-senddir-errors
...
Improve error handling for serve_dir
2020-11-28 23:30:03 +01:00
panicbit
00aa1f96f4
Merge pull request #37 from Alch-Emi/accept-string-docs
...
Accept strings in Document methods
2020-11-28 23:24:20 +01:00
Emii Tatsuo
9c999609ef
Accept strings in Document methods
...
A lot of the time users are using the document, it's in order to dynamically generate a page. However, when dynamically generating a page, most of the time you're working with String's, not just &str's. Currently, many Document methods only take an &str, which means that each time you call a method with something like the output from `format!()`, you need to add a `.as_str()`, which adds just a little bit of clutter.
This change makes it so that Document methods that previously took an `&str` can now take an `impl AsRef<str>`, which allows users to pass either an `&str` or a `String`.
2020-11-28 14:47:39 -05:00
panicbit
f43b03860d
Merge pull request #35 from Alch-Emi/list-example-test
...
Add "serve_dir" feature as a required feature for the example of the same name
2020-11-28 15:29:49 +01:00
panicbit
1296f1bba4
Merge pull request #36 from Alch-Emi/fix-stable-build
...
Fix stable build
2020-11-28 05:01:10 +01:00
Emii Tatsuo
71a79ad6ff
Fix stable build
2020-11-27 22:20:55 -05:00
Emi Tatsuo
65f3bbf2a2
Add "serve_dir" feature as a reaquired feature for the example of the same name
2020-11-24 16:50:28 -05:00
Emi Tatsuo
57f083b1d0
Updated changelog to reflect changes to success
...
Dang it I always forget to do that
2020-11-23 10:05:47 -05:00
Emi Tatsuo
4743419f1e
Update changelog with improved error handling for serve_dir
2020-11-23 09:49:04 -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
panicbit
3a999a16fe
Merge pull request #30 from Alch-Emi/doc-into-req
...
Allow direct conversion for Document -> Response
2020-11-22 20:54:08 +01:00
panicbit
6930a06ece
Merge pull request #32 from Alch-Emi/fix-kristall
...
Include a workaround for a bug with rustls & webpki
2020-11-22 10:18:15 +01:00
Ben Aaron Goldberg
4d0b0521d6
Include a workaround for a bug with rustls & webpki
2020-11-21 23:45:05 -05:00
Emi Tatsuo
5254c17e36
Rework Request::success methods
2020-11-20 14:18:11 -05:00
Emi Tatsuo
20181cce96
Updated changelog
2020-11-20 10:05:18 -05:00
Emi Tatsuo
3296d00ec3
Add From<Borrow<Document>> to Response
...
This allows users to call &mut Document.into() in order to create a response, so that you
can do it right in the middle of one of those builder call chain thingies
2020-11-20 09:51:37 -05:00
Emi Tatsuo
435330b415
Made Request::document a bit more generic
...
Also how did I not know about the Borrow trait until now???
2020-11-20 09:40:57 -05:00
panicbit
0ca71e46c9
Merge pull request #28 from Alch-Emi/clippy
...
Appease clippy
2020-11-20 00:56:47 +01:00
Emi Tatsuo
0bcce9fd6f
Appease clippy
...
Please my compiler is so angry ;-;
2020-11-19 18:03:10 -05:00
panicbit
07c2d539d0
Merge branch 'Alch-Emi-timeout-override'
2020-11-19 19:39:28 +01:00
panicbit
46ab84ba04
streamline send_response
2020-11-19 19:34:48 +01:00
Emi Tatsuo
aeeee86aae
Updated changelog for complex mime timeout override
2020-11-19 12:37:41 -05:00
Emi Tatsuo
b50a5e3244
Merge remote-tracking branch 'upstream/master' into timeout-override
2020-11-19 12:36:42 -05:00
panicbit
381bccf36f
update changelog
2020-11-19 18:35:21 +01:00
panicbit
4e251d0cb6
Merge pull request #25 from Alch-Emi/trim-deps
...
Trim dependencies & move directory serving utils to feature
2020-11-19 18:29:52 +01:00
panicbit
a3882b76de
update changelog
2020-11-19 18:18:29 +01:00
panicbit
824405d881
Merge pull request #23 from Alch-Emi/custom-cert-path
...
Add ability to customize certificate path
2020-11-19 18:14:32 +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
87d71cb207
Fixed examples
2020-11-19 11:08:20 -05:00
Emi Tatsuo
3da18ca530
Reduced tokio featureset
2020-11-19 10:21:32 -05:00
Emi Tatsuo
e0abe6344b
Reduced dependency on futures-rs
2020-11-19 02:54:45 -05:00
Emi Tatsuo
753ecf708d
Isolate directory serving methods behind feature, incl mime_guess. Remove itertools
2020-11-19 02:49:41 -05:00
Emi Tatsuo
df362d1bc3
Fixed bug where incorrect timeout was used. I got the mime types backwards haha pretend you didnt see that
2020-11-19 01:43:57 -05:00
Emi Tatsuo
25d575bee7
Shorten references to tokio::time::timeout because I forgot I used an import for that woops sorry
2020-11-19 01:30:08 -05:00
Emi Tatsuo
94d7a5ab4f
Added complex timeout override option to builder
2020-11-19 01:25:34 -05:00
Emi Tatsuo
a778774189
Added note about short timeouts to set_timeout docs
2020-11-18 23:29:00 -05:00
Emi Tatsuo
4e3417fb41
Added ability to customize certificate path
2020-11-18 23:10:48 -05:00
panicbit
bbf034cf47
update changelog
2020-11-18 23:18:50 +01:00
panicbit
f2b27665c2
correctly ignore doctest
2020-11-18 23:01:10 +01:00
panicbit
5a92d8d28f
use mime_guess for guessing mime
2020-11-18 23:00:46 +01:00
panicbit
ddf9c4b9f8
Merge pull request #22 from panicbit/21_increase_default_timeout
...
increase default timeout from 1 to 30 seconds
2020-11-18 22:54:46 +01:00
panicbit
fffada14e3
increase default timeout from 1 to 30 seconds
2020-11-18 22:46:18 +01:00
panicbit
65b35a48d7
update changelog
2020-11-18 21:29:21 +01:00
panicbit
931c3fbbc2
add temporary redirects and bad requests
2020-11-18 21:26:27 +01:00
panicbit
0daf01fd3e
update changelog
2020-11-18 21:16:14 +01:00