make download core store size in at least 64bits to allow for large files
This commit is contained in:
parent
e01c24cef7
commit
f64b37b29f
|
@ -42,7 +42,7 @@ struct download_context {
|
||||||
struct gui_window *parent; /**< Parent window */
|
struct gui_window *parent; /**< Parent window */
|
||||||
|
|
||||||
lwc_string *mime_type; /**< MIME type of download */
|
lwc_string *mime_type; /**< MIME type of download */
|
||||||
unsigned long total_length; /**< Length of data, in bytes */
|
unsigned long long int total_length; /**< Length of data, in bytes */
|
||||||
char *filename; /**< Suggested filename */
|
char *filename; /**< Suggested filename */
|
||||||
|
|
||||||
struct gui_download_window *window; /**< GUI download window */
|
struct gui_download_window *window; /**< GUI download window */
|
||||||
|
@ -94,7 +94,7 @@ static nserror download_context_process_headers(download_context *ctx)
|
||||||
{
|
{
|
||||||
const char *http_header;
|
const char *http_header;
|
||||||
http_content_type *content_type;
|
http_content_type *content_type;
|
||||||
unsigned long length;
|
unsigned long long int length;
|
||||||
nserror error;
|
nserror error;
|
||||||
|
|
||||||
/* Retrieve and parse Content-Type */
|
/* Retrieve and parse Content-Type */
|
||||||
|
@ -108,10 +108,11 @@ static nserror download_context_process_headers(download_context *ctx)
|
||||||
|
|
||||||
/* Retrieve and parse Content-Length */
|
/* Retrieve and parse Content-Length */
|
||||||
http_header = llcache_handle_get_header(ctx->llcache, "Content-Length");
|
http_header = llcache_handle_get_header(ctx->llcache, "Content-Length");
|
||||||
if (http_header == NULL)
|
if (http_header == NULL) {
|
||||||
length = 0;
|
length = 0;
|
||||||
else
|
} else {
|
||||||
length = strtoul(http_header, NULL, 10);
|
length = strtoull(http_header, NULL, 10);
|
||||||
|
}
|
||||||
|
|
||||||
/* Retrieve and parse Content-Disposition */
|
/* Retrieve and parse Content-Disposition */
|
||||||
http_header = llcache_handle_get_header(ctx->llcache,
|
http_header = llcache_handle_get_header(ctx->llcache,
|
||||||
|
@ -299,7 +300,8 @@ const char *download_context_get_mime_type(const download_context *ctx)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* See download.h for documentation */
|
/* See download.h for documentation */
|
||||||
unsigned long download_context_get_total_length(const download_context *ctx)
|
unsigned long long int
|
||||||
|
download_context_get_total_length(const download_context *ctx)
|
||||||
{
|
{
|
||||||
return ctx->total_length;
|
return ctx->total_length;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ const char *download_context_get_mime_type(const download_context *ctx);
|
||||||
* \param ctx Context to retrieve byte length from
|
* \param ctx Context to retrieve byte length from
|
||||||
* \return Total length, in bytes, or 0 if unknown
|
* \return Total length, in bytes, or 0 if unknown
|
||||||
*/
|
*/
|
||||||
unsigned long download_context_get_total_length(const download_context *ctx);
|
unsigned long long int download_context_get_total_length(const download_context *ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the filename for a download
|
* Retrieve the filename for a download
|
||||||
|
|
Loading…
Reference in New Issue