From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id E296D940FDB for ; Tue, 10 Jun 2025 06:12:18 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=X77Ezp/7oJcZXd5ob1lLkthOsXJnVB/D/6gxCqqHGjg=; c=relaxed/simple; d=groups.io; h=Subject:To:From:User-Agent:MIME-Version:Date:Message-ID:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240830; t=1749535938; v=1; x=1749795137; b=fG7WAGVpkwmOusYT8bsWbnuXNLg3pxpEr48WeI+SlcBE+zOBtNmEqgUDe+1C8tJqt6ryJoRI JrUlYQtxg1EBvX5nzCeCsbrcQqJr6DkgpEk24YDDbcTkVaiSpVzGIAKCwnbUroHoy33+i5LwKrx uWN8rMjfglC4dT0Xdo0jgbEWnYTbW0kblPXF9TX6r5oH34oKbt/RRKsQT8b84106mdXt3gon+7y F7liFbrjfujJ/k8/7WLnoydlLQF6cBDzNgtw1Ty4/YNx1huXewT8PBr2UfNpaYTG3Jrl/A4I2CE AitXzhCq3e3MHZW0DcZMHgv5EZhrv/CaQwxQGmr/uKmqg== X-Received: by 127.0.0.2 with SMTP id pojSYY7687511xaJThZbgvOi; Mon, 09 Jun 2025 23:12:17 -0700 Subject: [edk2-devel] HttpProtocol->request blocks execution To: devel@edk2.groups.io From: =?UTF-8?B?QW50w7NuaW8gU2lsdmEgdmlhIGdyb3Vwcy5pbw==?= X-Originating-Location: =?UTF-8?B?QnJhc8OtbGlhLCBGZWRlcmFsIERpc3RyaWN0LCBCUg==?= (179.214.68.132) X-Originating-Platform: Windows Chrome 137 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sat, 07 Jun 2025 07:38:48 -0700 Message-ID: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,apdars@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: RF4VeaB9VqALrGzJHrfbjsR1x7686176AA= Content-Type: multipart/alternative; boundary="AKMVvU0vHsF0epVqyflv" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=fG7WAGVp; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --AKMVvU0vHsF0epVqyflv Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable After configuring the HTTP Protocol, creating the event for the callback an= d filling all the necessary fields on the request token, I'm using : *.... Status =3D HttpProtocol->Request( HttpProtocol, &RequestToken);* *Print(L"Only gets printed after Request is successful"); * *....* To start the HTTP request. This code is being compiled as a UEFI Applicatio= n and run via UEFI SHELL using the QEMU emulator. The http request works as expected when the host is responsive, however, wh= en the host is unreachable (for example offline), the execution just hangs = for more than 2 minutes, eventually returning with a Status code of EFI_TIM= E_OUT. I have tried reducing the timeout interval by defining *.... ConfigData->TimeOutMillisec =C2=A0 =C2=A0=3D 5000;* *Status =3D HttpProtocol->Configure( HttpProtocol, ConfigData); ....* But this doesn't seem to change the behavior of the request function. Why is HttpProtocol->request blocking execution and not following the event= pattern, and how could I customize the timeout interval? Any feedback much appreciated, thank you! -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121409): https://edk2.groups.io/g/devel/message/121409 Mute This Topic: https://groups.io/mt/113565404/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --AKMVvU0vHsF0epVqyflv Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable
After configuring the HTTP Protocol, creating the event for= the callback and filling all the necessary fields on the request token, I'= m using :
....
 Status =3D HttpProtocol->Request(= HttpProtocol, &RequestToken);
 Print(L"Only gets= printed after Request is successful");
....

To start the HTTP request. This code = is being compiled as a UEFI Application and run via UEFI SHELL using the QE= MU emulator.

The http request works as expected when the host is= responsive, however, when the host is unreachable (for example offline), t= he execution just hangs for more than 2 minutes, eventually returning with = a Status code of EFI_TIME_OUT. 

I have tried reducing the t= imeout interval by defining
....
ConfigData->TimeOutMi= llisec    =3D 5000;
Status =3D HttpProtocol->Configure(HttpProtocol, Con= figData);
....

But this doesn't seem to = change the behavior of the request function. 

Why is HttpPr= otocol->request blocking execution and not following the event pattern, = and how could I customize the timeout interval?

Any feedback muc= h appreciated, thank you!
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#121409) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--AKMVvU0vHsF0epVqyflv--