mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
NetworkPkg/HttpDxe: Fix the incorrect SizeofHeaders in HttpTcpReceiveHeader().
Commit 19bd133562df951ae7ff7e1fff99b11a25b4cb6d 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;
|
||||
}
|
||||
};
|
||||
|
||||
//
|
||||
@ -2002,7 +1996,9 @@ HttpTcpReceiveHeader (
|
||||
//
|
||||
// Skip the CRLF after the HTTP headers.
|
||||
//
|
||||
*EndofHeader = *EndofHeader + AsciiStrLen (HTTP_END_OF_HDR_STR);
|
||||
*EndofHeader = *EndofHeader + AsciiStrLen (HTTP_END_OF_HDR_STR);
|
||||
|
||||
*SizeofHeaders = *EndofHeader - *HttpHeaders;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user