Browse Source

send if-none-match

pull/120/head
orignal 10 years ago
parent
commit
afd69e4afd
  1. 2
      AddressBook.cpp
  2. 1
      util.h

2
AddressBook.cpp

@ -440,7 +440,7 @@ namespace client
request << "GET " << u.path_ << " HTTP/1.1\r\nHost: " << u.host_ request << "GET " << u.path_ << " HTTP/1.1\r\nHost: " << u.host_
<< "\r\nAccept: */*\r\n" << "User-Agent: Wget/1.11.4\r\n" << "Connection: close\r\n"; << "\r\nAccept: */*\r\n" << "User-Agent: Wget/1.11.4\r\n" << "Connection: close\r\n";
if (m_Etag.length () > 0) // etag if (m_Etag.length () > 0) // etag
request << i2p::util::http::ETAG << ": " << m_Etag << "\r\n"; request << i2p::util::http::IF_NONE_MATCH << ": \"" << m_Etag << "\"\r\n";
if (m_LastModified.length () > 0) // if-modfief-since if (m_LastModified.length () > 0) // if-modfief-since
request << i2p::util::http::IF_MODIFIED_SINCE << ": " << m_LastModified << "\r\n"; request << i2p::util::http::IF_MODIFIED_SINCE << ": " << m_LastModified << "\r\n";
request << "\r\n"; // end of header request << "\r\n"; // end of header

1
util.h

@ -41,6 +41,7 @@ namespace util
namespace http namespace http
{ {
const char ETAG[] = "ETag"; const char ETAG[] = "ETag";
const char IF_NONE_MATCH[] = "If-None-Match";
const char IF_MODIFIED_SINCE[] = "If-Modified-Since"; const char IF_MODIFIED_SINCE[] = "If-Modified-Since";
const char LAST_MODIFIED[] = "Last-Modified"; const char LAST_MODIFIED[] = "Last-Modified";
const char TRANSFER_ENCODING[] = "Transfer-Encoding"; const char TRANSFER_ENCODING[] = "Transfer-Encoding";

Loading…
Cancel
Save