mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 01:44:26 +00:00
Set images cache expiry time to 300000 seconds
This commit is contained in:
parent
632fd84e54
commit
b0e138d669
@ -94,6 +94,9 @@ void AbstractRequestHandler::print_impl(const QByteArray& data, const QString& t
|
||||
if (!response_.headers.contains(HEADER_CONTENT_TYPE))
|
||||
response_.headers[HEADER_CONTENT_TYPE] = type;
|
||||
|
||||
if (type.indexOf("image") > -1)
|
||||
response_.headers[HEADER_CACHE_CONTROL] = "max-age=3000000";
|
||||
|
||||
response_.content += data;
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ const QString HEADER_SET_COOKIE = "Set-Cookie";
|
||||
const QString HEADER_CONTENT_TYPE = "Content-Type";
|
||||
const QString HEADER_CONTENT_ENCODING = "Content-Encoding";
|
||||
const QString HEADER_CONTENT_LENGTH = "Content-Length";
|
||||
const QString HEADER_CACHE_CONTROL = "Cache-Control";
|
||||
|
||||
const QString CONTENT_TYPE_CSS = "text/css; charset=UTF-8";
|
||||
const QString CONTENT_TYPE_GIF = "image/gif";
|
||||
|
Loading…
x
Reference in New Issue
Block a user