updated BUG section of README.md

This commit is contained in:
Fufu Fang 2019-04-23 03:05:03 +01:00
parent e166098162
commit f122cf000d
2 changed files with 5 additions and 2 deletions

View File

@ -75,6 +75,9 @@ This program downloads the HTML web pages/files using [libcurl](https://curl.hax
I wrote the cache system myself. It was a Herculean effort. I am immensely proud of it.
## Bugs
HTTPDirFS is particularly bad at handling any web servers that use percent-encoding. If anyone has got a quick fix, please submit a pull request.
## Acknowledgement
- I would like to thank [Cosmin Gorgovan](https://scholar.google.co.uk/citations?user=S7UZ6MAAAAAJ&hl=en) for the technical and moral support.
- I would like to thank [-Archivist]([https://www.reddit.com/user/-Archivist/](https://www.reddit.com/user/-Archivist/)) for not providing FTP or WebDAV access to his server. This piece of software was written in direct response to his appalling behaviour.

View File

@ -608,7 +608,6 @@ static void Seg_set(Cache *cf, off_t offset, int i)
long Cache_read(Cache *cf, char *output_buf, off_t size, off_t offset)
{
pthread_mutex_lock(&(cf->rw_lock));
long sent;
if (Seg_exist(cf, offset)) {
/*
@ -620,7 +619,8 @@ long Cache_read(Cache *cf, char *output_buf, off_t size, off_t offset)
/* Calculate the aligned offset */
off_t dl_offset = offset / cf->blksz * cf->blksz;
/* Download the segment */
long recv = path_download(cf->path, (char *) RECV_BUF, cf->blksz, dl_offset);
long recv = path_download(cf->path, (char *) RECV_BUF, cf->blksz,
dl_offset);
/* Send it off */
memmove(output_buf, RECV_BUF + (offset-dl_offset), size);
sent = size;