diff options
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; } |