summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpDxe/HttpProto.h
diff options
context:
space:
mode:
authorJiaxin Wu <Jiaxin.wu@intel.com>2018-07-02 09:48:12 +0800
committerJiaxin Wu <Jiaxin.wu@intel.com>2018-07-12 08:37:54 +0800
commit895b87e38015e0698c6a5c0633e0156b038a56f1 (patch)
tree4303c9a8b9d1e447728c5a06a45ebc80f4744da4 /NetworkPkg/HttpDxe/HttpProto.h
parentc6a14de3ef30291918f3b15436cf6a75db413eea (diff)
downloadedk2-895b87e38015e0698c6a5c0633e0156b038a56f1.tar.gz
edk2-895b87e38015e0698c6a5c0633e0156b038a56f1.tar.bz2
edk2-895b87e38015e0698c6a5c0633e0156b038a56f1.zip
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>
Diffstat (limited to 'NetworkPkg/HttpDxe/HttpProto.h')
-rw-r--r--NetworkPkg/HttpDxe/HttpProto.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/NetworkPkg/HttpDxe/HttpProto.h b/NetworkPkg/HttpDxe/HttpProto.h
index cc6c1eb566..fa57dbfd39 100644
--- a/NetworkPkg/HttpDxe/HttpProto.h
+++ b/NetworkPkg/HttpDxe/HttpProto.h
@@ -91,6 +91,15 @@ typedef struct {
EFI_TLS_SESSION_STATE SessionState;
} TLS_CONFIG_DATA;
+//
+// Callback data for HTTP_PARSER_CALLBACK()
+//
+typedef struct {
+ UINTN ParseDataLength;
+ VOID *ParseData;
+ VOID *Wrap;
+} HTTP_CALLBACK_DATA;
+
typedef struct _HTTP_PROTOCOL {
UINT32 Signature;
EFI_HTTP_PROTOCOL Http;
@@ -149,6 +158,7 @@ typedef struct _HTTP_PROTOCOL {
// HTTP message-body parser.
//
VOID *MsgParser;
+ HTTP_CALLBACK_DATA CallbackData;
EFI_HTTP_VERSION HttpVersion;
UINT32 TimeOutMillisec;