mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Fix incorrect SizeofHeaders returned from HttpTcpReceiveHeader().
This patch is to fix a bug that the HttpTcpReceiveHeader() may return incorrect SizeofHeaders, which will include some already received message-body. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
This commit is contained in:
parent
fca04738c9
commit
19bd133562
|
@ -1876,7 +1876,10 @@ HttpTcpReceiveHeader (
|
|||
//
|
||||
// Check whether we received end of HTTP headers.
|
||||
//
|
||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||
if (*EndofHeader != NULL) {
|
||||
*SizeofHeaders = *EndofHeader - *HttpHeaders;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -1976,6 +1979,9 @@ HttpTcpReceiveHeader (
|
|||
// Check whether we received end of HTTP headers.
|
||||
//
|
||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||
if (*EndofHeader != NULL) {
|
||||
*SizeofHeaders = *EndofHeader - *HttpHeaders;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue