示例#1
0
 bool parseImpl(HTTP2Codec& codec, std::function<void(IOBuf*)> hackIngress) {
   auto ingress = output_.move();
   if (hackIngress) {
     hackIngress(ingress.get());
   }
   size_t parsed = codec.onIngress(*ingress);
   return (parsed == ingress->computeChainDataLength());
 }
示例#2
0
 /*
  * hackIngress is used to keep the codec's strict checks while having
  * separate checks for tests
  */
 bool parseImpl(HTTP2Codec& codec, std::function<void(IOBuf*)> hackIngress) {
   dumpToFile(codec.getTransportDirection() == TransportDirection::UPSTREAM);
   auto ingress = output_.move();
   if (hackIngress) {
     hackIngress(ingress.get());
   }
   size_t parsed = codec.onIngress(*ingress);
   return (parsed == ingress->computeChainDataLength());
 }