Archived
1
0
Fork 0
Commit graph

9 commits

Author SHA1 Message Date
Henrik Hautakoski
dcd515b4b1 http.c: use buffer.h 2011-11-05 15:18:19 +01:00
Henrik Hautakoski
eb0702cd93 http: Adding http_fetch_file().
Sometimes, you want to fetch a file in memory so you can
store it on multiple places on disk whitout having to download it
again or copy files. while http_fetch_page works for fetching data
in memory, the possible filename found in the 'Content-Disposition'
header-feild is not accounted to.

http_fetch_file() fetches the data and store it in memory while trying to
get ahold of the filename.
2011-09-29 19:54:02 +02:00
Henrik Hautakoski
9767be013a http.c: refactor http request code.
remove duplicated curl code in 'fetch_page' and 'download_file'
and put it in an helper function.
2011-09-21 17:19:12 +02:00
Henrik Hautakoski
8cf883eb29 http.c: remove new-line from error() calls
one new-line is always appended to the message by the error function.
2011-09-21 17:19:11 +02:00
Henrik Hautakoski
c1a7c9671d http.c: skip memory storage when download files
don't need to store the http data in memory when downloading files, write to disk directly.
2011-09-21 17:19:11 +02:00
Henrik Hautakoski
a2569b58e3 http.c: remove double init of CURLhandle
handle is initialized in setup_connection()
2011-09-21 17:19:11 +02:00
Henrik Hautakoski
a2f2e58353 Make the other modules use error.c 2011-09-21 17:19:10 +02:00
Henrik Hautakoski
bb5963dbf6 License with GPLv2 2011-09-21 17:19:09 +02:00
Henrik Hautakoski
b2df740514 Initial commit 2011-09-21 17:13:28 +02:00