From f54ae4ed4fd2f22525492e2525d0f24a314e65b2 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Wed, 27 May 2020 19:16:27 +0200 Subject: [HICH-618] HTTP proxy automatic configuration. Change-Id: I6a76b31b743f155a2d9f7b88e84b838265aab6c8 Signed-off-by: Mauro Sardara --- apps/http-proxy/src/icn_receiver.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'apps/http-proxy/src/icn_receiver.cc') 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; } -- cgit 1.2.3-korg