This library is used to share code between UEFI network stack modules.\r
It provides the helper routines to parse the HTTP message byte stream.\r
\r
-Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
FoundAt = FALSE;\r
for (Char = Url; Char < Url + Length; Char++) {\r
//\r
- // Update state machine accoring to next char.\r
+ // Update state machine according to next char.\r
//\r
State = NetHttpParseUrlChar (*Char, State);\r
\r
{\r
CHAR8 *PortString;\r
EFI_STATUS Status;\r
+ UINTN Data;\r
UINT32 ResultLength;\r
HTTP_URL_PARSER *Parser;\r
\r
}\r
\r
PortString[ResultLength] = '\0';\r
- *Port = (UINT16) AsciiStrDecimalToUintn (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset);\r
\r
- return EFI_SUCCESS;\r
+ Status = AsciiStrDecimalToUintnS (Url + Parser->FieldData[HTTP_URI_FIELD_PORT].Offset, (CHAR8 **) NULL, &Data);\r
+\r
+ *Port = (UINT16) Data;\r
+ return Status;\r
}\r
\r
/**\r
return EFI_NOT_FOUND;\r
}\r
\r
- *ContentLength = AsciiStrDecimalToUintn (Header->FieldValue);\r
- return EFI_SUCCESS;\r
+ return AsciiStrDecimalToUintnS (Header->FieldValue, (CHAR8 **) NULL, ContentLength);\r
}\r
\r
/**\r
\r
\r
/**\r
- Get the next string, which is distinguished by specified seperator.\r
+ Get the next string, which is distinguished by specified separator.\r
\r
@param[in] String Pointer to the string.\r
- @param[in] Seperator Specified seperator used to distinguish where is the beginning\r
+ @param[in] Separator Specified separator used to distinguish where is the beginning\r
of next string.\r
\r
@return Pointer to the next string.\r
EFIAPI\r
AsciiStrGetNextToken (\r
IN CONST CHAR8 *String,\r
- IN CHAR8 Seperator\r
+ IN CHAR8 Separator\r
)\r
{\r
CONST CHAR8 *Token;\r
if (*Token == 0) {\r
return NULL;\r
}\r
- if (*Token == Seperator) {\r
+ if (*Token == Separator) {\r
return (CHAR8 *)(Token + 1);\r
}\r
Token++;\r
\r
ASSERT (Message != NULL);\r
\r
- *RequestMsg = NULL;\r
- MsgSize = 0;\r
- Success = FALSE;\r
- HttpHdr = NULL;\r
- AppendList = NULL;\r
+ *RequestMsg = NULL;\r
+ Status = EFI_SUCCESS;\r
+ HttpHdrSize = 0;\r
+ MsgSize = 0;\r
+ Success = FALSE;\r
+ HttpHdr = NULL;\r
+ AppendList = NULL;\r
HttpUtilitiesProtocol = NULL;\r
\r
//\r