fix #1314
This commit is contained in:
parent
35b378d8b1
commit
3a97d5880c
@ -153,6 +153,8 @@
|
|||||||
|
|
||||||
#define CLI_THREADS "threads"
|
#define CLI_THREADS "threads"
|
||||||
|
|
||||||
|
#define HTTP_CODE_NOT_MODIFIED 304
|
||||||
|
|
||||||
#define HTTP_HEADERS_ACCEPT "Accept"
|
#define HTTP_HEADERS_ACCEPT "Accept"
|
||||||
#define HTTP_HEADERS_CONTENT_TYPE "Content-Type"
|
#define HTTP_HEADERS_CONTENT_TYPE "Content-Type"
|
||||||
#define HTTP_HEADERS_CONTENT_LENGTH "Content-Length"
|
#define HTTP_HEADERS_CONTENT_LENGTH "Content-Length"
|
||||||
|
@ -238,6 +238,14 @@ QList<Message> StandardServiceRoot::obtainNewMessages(Feed* feed,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
f->setLastEtag(network_result.m_headers.value(QSL("etag")));
|
f->setLastEtag(network_result.m_headers.value(QSL("etag")));
|
||||||
|
|
||||||
|
if (network_result.m_httpCode == HTTP_CODE_NOT_MODIFIED && feed_contents.trimmed().isEmpty()) {
|
||||||
|
// We very likely used "eTag" before and server reports that
|
||||||
|
// content was not modified since.
|
||||||
|
qWarningNN << LOGSEC_CORE << QUOTE_W_SPACE(feed->source())
|
||||||
|
<< "reported HTTP/304, meaning that the remote file did not change since last time we checked it.";
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (f->sourceType() == StandardFeed::SourceType::EmbeddedBrowser) {
|
else if (f->sourceType() == StandardFeed::SourceType::EmbeddedBrowser) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user