Merge remote-tracking branch 'origin/topic/jazoff/memory-reduction-mime'

* origin/topic/jazoff/memory-reduction-mime:
  Avoid buffering all http headers

Adjusted during merge:
  * whitespace
  * logic for HTTP needs to consider whether either mime_all_headers
    or http_all_headers events are being used
This commit is contained in:
Jon Siwek 2019-08-12 19:30:26 -07:00
commit 7fc664b545
5 changed files with 24 additions and 3 deletions

View file

@ -53,6 +53,9 @@ HTTP_Entity::HTTP_Entity(HTTP_Message *arg_message, MIME_Entity* parent_entity,
offset = 0;
instance_length = -1; // unspecified
send_size = true;
// MIME_Entity already set want_all_headers depending on mime_all_headers
if ( ! want_all_headers )
want_all_headers = (bool)http_all_headers;
}
void HTTP_Entity::EndOfData()
@ -762,7 +765,10 @@ void HTTP_Message::SubmitAllHeaders(mime::MIME_HeaderList& hlist)
void HTTP_Message::SubmitTrailingHeaders(mime::MIME_HeaderList& /* hlist */)
{
// Do nothing for now.
// Do nothing for now. Note that if this ever changes do something
// which relies on the header list argument, that's currently not
// populated unless the http_all_headers or mime_all_headers events
// are being used (so you may need to change that, too).
}
void HTTP_Message::SubmitData(int len, const char* buf)