updated BUG section of README.md
This commit is contained in:
parent
e166098162
commit
f122cf000d
|
@ -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.
|
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
|
## 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 [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.
|
- 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.
|
||||||
|
|
|
@ -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)
|
long Cache_read(Cache *cf, char *output_buf, off_t size, off_t offset)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&(cf->rw_lock));
|
pthread_mutex_lock(&(cf->rw_lock));
|
||||||
|
|
||||||
long sent;
|
long sent;
|
||||||
if (Seg_exist(cf, offset)) {
|
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 */
|
/* Calculate the aligned offset */
|
||||||
off_t dl_offset = offset / cf->blksz * cf->blksz;
|
off_t dl_offset = offset / cf->blksz * cf->blksz;
|
||||||
/* Download the segment */
|
/* 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 */
|
/* Send it off */
|
||||||
memmove(output_buf, RECV_BUF + (offset-dl_offset), size);
|
memmove(output_buf, RECV_BUF + (offset-dl_offset), size);
|
||||||
sent = size;
|
sent = size;
|
||||||
|
|
Loading…
Reference in New Issue