mirror of https://github.com/acidanthera/audk.git
NetworkPkg/HttpDxe: Fix the incorrect SizeofHeaders in HttpTcpReceiveHeader().
Commit 19bd133562
is to fix the incorrect SizeofHeaders
returned from HttpTcpReceiveHeader(). But it missed the "\r\n\r\n" calculation, which
will cause the later HttpHeaders parsing failure.
This patch is fix the above issue.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.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>
This commit is contained in:
parent
3d544c564b
commit
b16abfcc34
|
@ -1877,9 +1877,6 @@ HttpTcpReceiveHeader (
|
|||
// Check whether we received end of HTTP headers.
|
||||
//
|
||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||
if (*EndofHeader != NULL) {
|
||||
*SizeofHeaders = *EndofHeader - *HttpHeaders;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -1979,9 +1976,6 @@ HttpTcpReceiveHeader (
|
|||
// Check whether we received end of HTTP headers.
|
||||
//
|
||||
*EndofHeader = AsciiStrStr (*HttpHeaders, HTTP_END_OF_HDR_STR);
|
||||
if (*EndofHeader != NULL) {
|
||||
*SizeofHeaders = *EndofHeader - *HttpHeaders;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -2004,6 +1998,8 @@ HttpTcpReceiveHeader (
|
|||
//
|
||||
*EndofHeader = *EndofHeader + AsciiStrLen (HTTP_END_OF_HDR_STR);
|
||||
|
||||
*SizeofHeaders = *EndofHeader - *HttpHeaders;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue