NetworkPkg/HttpDxe: Fix the bug when parsing HTTP(S) message body.
authorJiaxin Wu <Jiaxin.wu@intel.com>
Mon, 2 Jul 2018 01:48:12 +0000 (09:48 +0800)
committerJiaxin Wu <Jiaxin.wu@intel.com>
Thu, 12 Jul 2018 00:37:54 +0000 (08:37 +0800)
commit895b87e38015e0698c6a5c0633e0156b038a56f1
tree4303c9a8b9d1e447728c5a06a45ebc80f4744da4
parentc6a14de3ef30291918f3b15436cf6a75db413eea
NetworkPkg/HttpDxe: Fix the bug when parsing HTTP(S) message body.

*v2: Resolve the conflict commit.

*v3: Fixed the failure if BodyLength in HTTP token is less than the received
size of HTTPS message.

HttpBodyParserCallback function is to parse the HTTP(S) message body so as to
confirm whether there is the next message header. But it doesn't record the
parsing message data/length correctly.

This patch is refine the parsing logic so as to fix the potential failure.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Gary Lin <glin@suse.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Tested-by: Gary Lin <glin@suse.com>
NetworkPkg/HttpDxe/HttpImpl.c
NetworkPkg/HttpDxe/HttpProto.c
NetworkPkg/HttpDxe/HttpProto.h