summaryrefslogtreecommitdiffstats
path: root/NetworkPkg/HttpBootDxe/HttpBootClient.c
Commit message (Collapse)AuthorAgeFilesLines
* NetworkPkg/DxeHttpLib: Migrate HTTP header manipulation APIsAbner Chang2021-01-141-5/+5
| | | | | | | | | | | | | | | | Move HTTP header manipulation functions to DxeHttpLib from HttpBootSupport.c. These general functions are used by both Http BOOT and RedfishLib (patches will be sent later). Signed-off-by: Abner Chang <abner.chang@hpe.com> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Fan Wang <fan.wang@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Nickle Wang <nickle.wang@hpe.com> Cc: Peter O'Hanley <peter.ohanley@hpe.com> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
* NetworkPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-091-7/+1
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Clean up source filesLiming Gao2018-06-281-41/+41
| | | | | | | | | 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
* NetworkPkg/HttpBootDxe: Fix the incorrect error message output.Jiaxin Wu2018-03-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | For IPv6 case, if one invalid URL returned from DHCP server, HttpBootDxe driver could not retrieve the URL host address from DNS server. In such a case, the error message should be printed as: Error: Could not retrieve the host address from DNS server. Instead of: Error: Could not discover the boot information for DHCP server. Then, we can still output as following: Error: Could not retrieve NBP file size from HTTP server. Besides, currently implementation in HttpBootLoadFile will always output error message even the HTTP process is correct. This patch is to fix 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> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg/HttpBootDxe: Correct the parameter check for the usage of ↵Jiaxin Wu2018-03-021-7/+6
| | | | | | | | | | | | | HttpBootGetFileFromCache. The patch is to fix the incorrect parameter check for the HttpBootGetFileFromCache(). 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> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg/HttpBootDxe: Avoid to corrupt HttpBootDxe setup screen.Jiaxin Wu2018-01-251-0/+10
| | | | | | | | | | | | | | When giving an invalid URI in Boot URI field within HTTP Boot configuration page, the AsciiPrint will corrupt the setup screen. This patch is to resolve the issue. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Karunakar P <karunakarp@amiindia.co.in> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg/HttpBootDxe: Update device path node to include DNS informationJiaxin Wu2017-08-141-24/+114
| | | | | | | | 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: Ye Ting <ting.ye@intel.com>
* NetworkPkg/HttpBootDxe: Add HTTP Boot Callback protocol support.Fu Siyuan2017-06-221-2/+65
| | | | | | | | | | | This patch updates the HTTP Boot driver to install a default HTTP Callback protocol if the platform doesn't provide one. This callback implementation will print the boot file download progress in percentage format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
* NetworkPkg: Add PCD to enable the HTTP connections switchJiaxin Wu2017-01-231-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | v3: * Correct the commits grammar v2: * Rename the PCD to PcdAllowHttpConnections. * Refine the PCD descriptions. If the value of PcdAllowHttpConnections is TRUE, HTTP connections are allowed. Both the "https://" and "http://" URI schemes are permitted. Otherwise, HTTP connections are denied. Only the "https://" URI scheme is permitted. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Kinney Michael D <michael.d.kinney@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Gary Lin <glin@suse.com> Tested-by: Gary Lin <glin@suse.com>
* NetworkPkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStrStar Zeng2016-06-211-10/+9
| | | | | | | | | | | | | | | It is the follow up of 3ab41b7a325ca11a12b42f5ad1661c4b6791cb49 to replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr with UnicodeStrToAsciiStrS/AsciiStrToUnicodeStrS. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Siyuan Fu <siyuan.fu@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
* NetworkPkg: Fix IPv6 boot failure in diff net segment issueJiaxin Wu2016-06-131-9/+9
| | | | | | | | | | | | This patch is used to fix HTTP IPv6 boot failure in diff net segment issue. IPv6 gateway address should be registered before DNS query, otherwise, DNS query will fail. Cc: Ye Ting <ting.ye@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
* NetworkPkg: Handling timeout case in httpboot driverJiaxin Wu2016-06-131-2/+8
| | | | | | | | | | | | | | | | | | | This patch is used to handle timeout case when downloading the message. The Status in the token should also be checked to handle any response error case including timeout case. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Cc: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Cc: Gary Lin <glin@suse.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Gary Lin <glin@suse.com> Reviewed-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Tested-by: Gary Lin <glin@suse.com> Tested-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
* NetworkPkg: Make HttpBootGetBootFile return EFI_BUFFER_TOO_SMALLGary Lin2016-05-131-1/+3
| | | | | | | | | Per the description of HttpBootGetBootFile, the function should return EFI_BUFFER_TOO_SMALL if the given buffer is smaller than the remote image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg: Add RAM disk boot support to HTTP Boot driver.Fu Siyuan2016-04-111-6/+31
| | | | | | | | | | | | | | | | | | | This patch updates the HTTP Boot driver to support the download and boot a RAM disk image from HTTP server. The HTTP RAM disk boot is described in section 23.7 "HTTP Boot" in UEFI 2.6. HTTP server could provide either an UEFI image or a RAM disk image for the HTTP boot client to use. The RAM disk image must contain a UEFI compliant file system in it. HTTP boot driver will identify the image type either by the "Content-Type" entity header filed or by the file name extension as below: "application/efi" or *.efi -> EFI Image *.iso -> CD/DVD Image *.img -> Virtual Disk Image Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
* NetworkPkg: Fix the driver model issue in HTTP Boot driver.Fu Siyuan2016-03-161-1/+4
| | | | | | | | | | | | | | | | | | | The HTTP Boot driver have some UEFI driver model problems which will make the code ASSERT when it's disconnected. First, the driver opens the HttpSb protocol BY_CHILD without BY_DRIVER attribute. So the driver binding stop won't be called when HTTP driver is disconnected, so a child handle is left and made HTTP driver binding stop function goes into error. This patch remove this unnecessary OpenProtocol and only unload the HII from when both the IP4 and IP6 stack have been stopped completely. The second issue is the HTTP boot driver always use the driver's image handle as it's driver binding handle, it's not correct. HTTP Boot driver provides 2 separate driver binding protocols from IP4 and IP6 stack, so it has 2 driver binding handle. So this patch fix the code to use correct driver binding handle when create/open a HTTP child handle. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Add URI configuration form to HTTP boot driver.Fu Siyuan2016-03-071-44/+55
| | | | | | | | | | | | This patch updates the HTTP boot driver to produce a setup page for the boot file URI configuration. A new boot option will be created for the manual configured URI address. This change is made to support the HTTP boot usage in home environment. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com>
* NetworkPkg: Use Http11 definitions in HttpDxe and HttpBootDxeSamer El-Haj-Mahmoud2016-02-251-3/+4
| | | | | | | | | Change HttpDxe and HttpBootDxe to use the standard definitions from Http11.h instead of private duplicate definitions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
* NetworkPkg:Add a new error status code EFI_HTTP_ERRORZhang Lubo2016-02-031-2/+8
| | | | | | | | | | | | | | | | | | | | | | v4: * Update macro HTTP_ERROR_STATUS to HTTP_ERROR_OR_NOT_SUPPORT_STATUS_CODE Update copyright year. When the Error Status of ResponseData returned from HttpIoRecvResponse function during the Http HEAD method, it should also return error status to Load file protocol. Add a new error status code EFI_HTTP_ERROR in corresponding with the UEFI 2.6 spec . When a HTTP error occurred during the network operation, The EFI_HTTP_ERROR is returned in token. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Siyuan Fu <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
* NetworkPkg: Fix some typos in Http boot driver.Paulo Alcantara2016-01-121-4/+4
| | | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19640 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Remove a CopyMem to speed up the HTTP boot download.Fu Siyuan2015-12-231-108/+163
| | | | | | | | | | | | | This patch updates the HTTP boot driver to use the caller provided buffer directly in identity transfer-coding mode, this could save one time CopyMem operation to benefit the download performance. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19482 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg:Enable Http Boot over Ipv6 stackZhang Lubo2015-11-091-24/+210
| | | | | | | | | | | | Add new features to support Http boot over ipv6 stack. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18743 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Update cache management in HTTP boot driver.Fu Siyuan2015-09-141-28/+35
| | | | | | | | | | | | | The original HTTP boot driver always save the received message body in its cache, it bring a large of memory allocation during HTTP download. This patch updates the HTTP boot driver to only cache data when caller doesn't provide a buffer for download (which is usually used when caller want to get the required buffer size). Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18448 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Convert the UNIX to DOS end of line formatJiaxin Wu2015-08-271-830/+830
| | | | | | | | | Convert the UNIX to DOS end of line format. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18326 6f19259b-4bc3-4df7-8a09-765794883524
* NetworkPkg: Add UEFI HTTP boot driver.Fu Siyuan2015-07-071-0/+830
This patch add the implementation for UEFI HTTP boot driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17857 6f19259b-4bc3-4df7-8a09-765794883524