diff options
author | Mauro Sardara <msardara@cisco.com> | 2020-05-27 19:16:27 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2020-05-29 20:25:19 +0200 |
commit | f54ae4ed4fd2f22525492e2525d0f24a314e65b2 (patch) | |
tree | fa0ac2ced671ccffd24a885e930834b8e2ecba48 /apps/http-proxy/src/icn_receiver.cc | |
parent | 4214534b001c27f1923bbb2a8e69fd7372ba5947 (diff) |
[HICH-618] HTTP proxy automatic configuration.
Change-Id: I6a76b31b743f155a2d9f7b88e84b838265aab6c8
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'apps/http-proxy/src/icn_receiver.cc')
-rw-r--r-- | apps/http-proxy/src/icn_receiver.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/http-proxy/src/icn_receiver.cc b/apps/http-proxy/src/icn_receiver.cc index 3bd5525cc..6ccd2dc31 100644 --- a/apps/http-proxy/src/icn_receiver.cc +++ b/apps/http-proxy/src/icn_receiver.cc @@ -105,11 +105,13 @@ void AsyncConsumerProducer::doReceive() { interface::ProducerCallbacksOptions::CACHE_MISS, [this](interface::ProducerSocket& producer, interface::Interest& interest) { - // core::Name n(interest.getWritableName(), true); - io_service_.post(std::bind( - &AsyncConsumerProducer::manageIncomingInterest, this, - interest.getWritableName(), interest.acquireMemBufReference(), - interest.getPayload().release())); + if (interest.payloadSize() > 0) { + // Interest may contain http request + io_service_.post(std::bind( + &AsyncConsumerProducer::manageIncomingInterest, this, + interest.getWritableName(), interest.acquireMemBufReference(), + interest.getPayload().release())); + } }); producer_socket_.connect(); @@ -125,7 +127,7 @@ void AsyncConsumerProducer::manageIncomingInterest( if (_it != _end) { if (_it->second.second) { TRANSPORT_LOGD( - "Content is in production, interest will be satisfied shortly."); + "Content is in production, interests will be satisfied shortly."); return; } |