NetworkPkg: DxeHttpLib: Use HTTP error 429

Include a mapping for HTTP error 429 to return the correct
status code. Additionally include a link to the official
HTTP status codes in the HttpMappingToStatusCode function header.

Signed-off-by: Kenneth Lautner <kenlautner3@gmail.com>
This commit is contained in:
Ken Lautner 2024-08-28 11:17:22 -07:00 committed by mergify[bot]
parent 829f773e5c
commit 82c5cacd13
2 changed files with 8 additions and 0 deletions

View File

@ -444,6 +444,9 @@ HttpGenRequestMessage (
Translate the status code in HTTP message to EFI_HTTP_STATUS_CODE defined
in UEFI 2.5 specification.
The official HTTP status codes can be found here:
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
@param[in] StatusCode The status code value in HTTP message.
@return Value defined in EFI_HTTP_STATUS_CODE .

View File

@ -1995,6 +1995,9 @@ Exit:
Translate the status code in HTTP message to EFI_HTTP_STATUS_CODE defined
in UEFI 2.5 specification.
The official HTTP status codes can be found here:
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
@param[in] StatusCode The status code value in HTTP message.
@return Value defined in EFI_HTTP_STATUS_CODE .
@ -2077,6 +2080,8 @@ HttpMappingToStatusCode (
return HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED;
case 417:
return HTTP_STATUS_417_EXPECTATION_FAILED;
case 429:
return HTTP_STATUS_429_TOO_MANY_REQUESTS;
case 500:
return HTTP_STATUS_500_INTERNAL_SERVER_ERROR;
case 501: