mirror of
https://github.com/YGGverse/titanit.git
synced 2026-03-31 09:05:45 +00:00
update comments
This commit is contained in:
parent
48b7adb18b
commit
c7ab6e5972
1 changed files with 2 additions and 0 deletions
|
|
@ -127,6 +127,7 @@ fn gemini(
|
||||||
match storage::Item::from_url(gemini.url.as_str(), &argument.directory) {
|
match storage::Item::from_url(gemini.url.as_str(), &argument.directory) {
|
||||||
Ok(item) => {
|
Ok(item) => {
|
||||||
let mut read: usize = 0;
|
let mut read: usize = 0;
|
||||||
|
// send header
|
||||||
match stream.write_all(
|
match stream.write_all(
|
||||||
&response::success::Default {
|
&response::success::Default {
|
||||||
mime: item.mime,
|
mime: item.mime,
|
||||||
|
|
@ -134,6 +135,7 @@ fn gemini(
|
||||||
}
|
}
|
||||||
.into_bytes(),
|
.into_bytes(),
|
||||||
) {
|
) {
|
||||||
|
// chunk begin
|
||||||
Ok(()) => loop {
|
Ok(()) => loop {
|
||||||
let mut data = vec![0; argument.chunk];
|
let mut data = vec![0; argument.chunk];
|
||||||
match item.file.read_at(&mut data, read as u64) {
|
match item.file.read_at(&mut data, read as u64) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue