Skip to content
Permalink
Browse files

http, bugfix: Allow yourself to parse the chunked body by setting max…

…BodySize = 0 (#471)
  • Loading branch information...
illuspas authored and xicilion committed Sep 30, 2018
1 parent 999cf07 commit 6c886d6133993410d605a1a6d3ac6d998c02c234
Showing with 3 additions and 0 deletions.
  1. +3 −0 fibjs/src/http/HttpMessage.cpp
3 fibjs/src/http/HttpMessage.cpp 100644 → 100755
@@ -231,6 +231,9 @@ result_t HttpMessage::readFrom(Stream_base* stm, AsyncEvent* ac)
}

if (pThis->m_bChunked) {
if (pThis->m_pThis->m_maxBodySize == 0)
return pThis->done();

if (pThis->m_contentLength)
return CHECK_ERROR(CALL_E_INVALID_DATA);

0 comments on commit 6c886d6

Please sign in to comment.
You can’t perform that action at this time.