NetworkPkg: Display HTTP redirection info to the screen if need.

HTTP defines a set of status code for redirecting a request to a different URI
in Section 6.4 of RFC7231 and also RFC7583. This patch updates the HTTP boot
driver to display the redirection info to the screen so the user would have
chance to know new URI address of the HTTP boot image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
Fu Siyuan
2017-07-26 15:57:38 +08:00
parent f11a7a5552
commit bb4831c03d
4 changed files with 62 additions and 3 deletions

View File

@ -445,4 +445,17 @@ HttpBootRegisterRamDisk (
IN VOID *Buffer,
IN HTTP_BOOT_IMAGE_TYPE ImageType
);
/**
Indicate if the HTTP status code indicates a redirection.
@param[in] StatusCode HTTP status code from server.
@return TRUE if it's redirection.
**/
BOOLEAN
HttpBootIsHttpRedirectStatusCode (
IN EFI_HTTP_STATUS_CODE StatusCode
);
#endif