mime_header.cc File Reference
#include "squid.h"
#include "Debug.h"
#include "mime_header.h"
#include "profiler/Profiler.h"
#include "sbuf/SBuf.h"
Include dependency graph for mime_header.cc:

Go to the source code of this file.


size_t headersEnd (const char *mime, size_t l, bool &containsObsFold)
size_t headersEnd (const SBuf &buf, bool &containsObsFold)

Function Documentation

◆ headersEnd() [1/2]

size_t headersEnd ( const char *  ,
size_t  ,
bool &  containsObsFold 

Scan for the end of mime header block.

Which is one of the following octet patterns:

  • CRLF CRLF, or
  • CRLF LF, or
  • LF CRLF, or
  • LF LF or, if mime header block is empty:
  • LF or
  • CRLF

Also detects whether a obf-fold pattern exists within the mime block

  • CR*LF (SP / HTAB)
containsObsFoldwill be set to true if obs-fold pattern is found.

Definition at line 18 of file mime_header.cc.

References headersEnd(), PROF_start, and PROF_stop.

Referenced by detailEntryEnd(), Http::One::Parser::grabMimeBlock(), headersEnd(), HttpHeader::Isolate(), netdbExchangeHandleReply(), Http::Message::parse(), Rock::HeaderUpdater::parseReadBytes(), peerDigestFetchReply(), peerDigestSwapInHeaders(), store_client::readBody(), testHttpReply::testSanityCheckFirstLine(), testHttpRequest::testSanityCheckStartLine(), and urnHandleReply().

◆ headersEnd() [2/2]

size_t headersEnd ( const SBuf buf,
bool &  containsObsFold 

Definition at line 72 of file mime_header.cc.

References headersEnd(), SBuf::length(), and SBuf::rawContent().






Web Site Translations