From nobody Sun May 19 16:27:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+99411+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+99411+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1675274321296847.8294594972068; Wed, 1 Feb 2023 09:58:41 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id FKYTYY1788612xW0u2b3LhCD; Wed, 01 Feb 2023 09:58:40 -0800 X-Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.74]) by mx.groups.io with SMTP id smtpd.web10.30851.1675274319323824923 for ; Wed, 01 Feb 2023 09:58:40 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LpkQ4jO38Jo/0kI3RVGIRyFfcjx58QSWYRFM6FfjTMMXG9wyfs6elVix6FHhd3xc4BFRaHGucbG3NlcS+1MlUSKemOpaPpbR5+zS9jAF64AIV8cucUzeXPhZkPV4fuRaIb4Fmg4mEjsusUGGtC2cHfBrzv5r3+zxCGcV8xA7hVVcXjPPynkSkvN3oWEiVlOJszcTKLRn7FTpbalGlYsuy2zpvSuuE6ifezBk5JXcjf7Zo9T7ZdI6/er/phebYgTZZONJfcOcWZWjIVUk5yVgsX7KazZSs1jvEFWNUXJRi7bAZw5TzNAzgDf8vbPjzdjiO6IuqiUdPmr2FxSPvN6Kdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9r15a/HsDxNGHR27TVromEk4WLCP/fGqBZcK2NbWfKs=; b=YyW8lKzS29jujNxcywwGRfnNQtLo8uxk329d0E9roN16uTW7aJ86cj1XnjvklEwOf4QqkFQfXcHL4fABZy/5wJysVYyMjyAiESMsibxwGIbzXYIpdqSktQm3TK74J66KPAl/UeEq018kHqWZrO6mXwXw1Z2bXRBN7njLxXc8w5/SSKx56AaRqBHnn7QH80DVDVeeRlZXLXnRNT2aUXzxQlEL/r1e1ZRQmG2hL8V6q2jhiYxD9OtsbtYTWoz7a5jF9DobbnwXO/EZM91JESo4NxzcFBq5HgnamC08daXzA/P0uzhr6qA+AZ4PKR10yDjIvQ6czpem97T+uOpu5hhkiA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com (2603:10b6:208:328::16) by SJ1PR10MB6004.namprd10.prod.outlook.com (2603:10b6:a03:45d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.21; Wed, 1 Feb 2023 17:58:35 +0000 X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::3318:8f42:7036:dbbf]) by BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::3318:8f42:7036:dbbf%6]) with mapi id 15.20.6064.025; Wed, 1 Feb 2023 17:58:35 +0000 From: "Igor Kulchytskyy via groups.io" To: "devel@edk2.groups.io" CC: Igor Kulchytskyy , Abner Chang , Nickle Wang Subject: [edk2-devel] [PATCH] RedfishPkg: RedfishRestExDxe: PCD introduced to disable chunked reguest Thread-Topic: [PATCH] RedfishPkg: RedfishRestExDxe: PCD introduced to disable chunked reguest Thread-Index: AQHZNmbN8RqcSVRMHUesVmEbiJwDmA== Date: Wed, 1 Feb 2023 17:58:35 +0000 Message-ID: <1675274302-14788-1-git-send-email-igork@ami.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BLAPR10MB5185:EE_|SJ1PR10MB6004:EE_ x-ms-office365-filtering-correlation-id: 40a08c5b-1616-459b-fefa-08db047df042 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: L76IfNu9lXd7v8mDM2hAREzt/cq5pEM7JN1DzSjZ2opsz8lWpmkOsDI26MCy+m+Yx9M+Z+SLTDfmKGSmbFR5BRT9CQLtIRf2/KPQnJnUu75ATSH22oXBRs7fTPt63KJ+127mKGMAUJyUFeZyvDTw8R5Ieyf1265+iawI2mYEMcTbOjSrK88Vt6Q0P31A4HMbu0cyOTx6thVHg9pa7OKSb03mZpQQ7k3b4nuhmtsGOk4uZAEne5TSdV7S4UaJIVlHN4jB7PpG9VNj5y/bdHlGq6IuT04CnyNbAiMc0xDeDXK0HoAvl+li7KH9eAVDEeHIwuGA0IUBlq9ORjq5rFE/ANRAxjyqdJF1h6ALCw40oTKFcHRUdBuf/O9qtVOwmbTCHCjli+k9qH0POCDrTje5ArK4qCnp0jh7ZwRsaFIukHB4ibnpDq/AUrYzBsCguQBUER4+MebisEPmcaZ+VaTof8hQKNxDESL97sCbobRYzHTydk+hAJmvFHEXO8qrzesjR3xrcFPgpMhcaj/F+j06s6pqaN3dS5xYL7M1A//LhDzBwz1qgHU82b5KvL+sHSRVt7FsDTucoWAgL2CeApeOKvtyaPgOWYo96ttRjl9TnH5isp4g6kHu66AqV1AndRf/V17GLYjrc2WjUf3YC31kvyTliqEmhcxzuR+OePvfaHfWAcgMwShjupXCl1tR4m3mN91k/RSfBdZK8Se0Vn9HSg== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?biF1V9ja5u9ujwwPE5y89cngwxISSEuJRNl3KJSA6jJzHUV+PDjCQX3oLy?= =?iso-8859-1?Q?71ETR2y95L33H7T9gdokC02p4ND2N46ANgxKRzJmgapfNC6VhUBC+E4T84?= =?iso-8859-1?Q?YYPlXie0CooAJcRYcMKCjRsT1FWm7S3ByVS/g45wDffRzIGY3knlBckE65?= =?iso-8859-1?Q?61LcJMhXJ7fH+77JdwvuSj0Ki421aJRBSmoQ9neWtLBNOPls+lEKFNcYR6?= =?iso-8859-1?Q?PdwPy9P0TAW/Z3kKJjODu4bN3oShwEHfZ9vB9YKkw3tK+/qSvpS7hp4+40?= =?iso-8859-1?Q?aY2rkOtlvE9tkrdCwQTVYavixInL2a9Oijn9vanA0qQ1vf47aDblgqo/GB?= =?iso-8859-1?Q?VZIfAH2lL3ZNcbYWpFhuzdUn/ZmgNbFGgGkQ23ayXuNq3TifkaHPCsiKmO?= =?iso-8859-1?Q?Wbj8pPd9S9oTYcSuuwFi8h+fVMgoGjmyYHxFUeRqH6/r+eAoCzlca9gIKY?= =?iso-8859-1?Q?6XQmC1i+G9UAUHHX7TXHyoy9SoedZ3ElMrEptk5jKEVpY6mF/NBrJJd6z9?= =?iso-8859-1?Q?4yVC4dd7Wlz/iKfQP6z5FQwF7751JY8FAD9nWWkW0u7Nb7h/CE0dkIV8f1?= =?iso-8859-1?Q?n13POZ0ziOFhuu/dRKXTy9aWytmJIBCPmk6LnfIYmI+Orl8kUqc0EBYARZ?= =?iso-8859-1?Q?J53UQnMHu+PDQl+5uZ3b+X81mxWNHuisf4WjUm8qj/FeEG+agr9XduGBv9?= =?iso-8859-1?Q?DZ0IfpPpnNoZrJ3t5owHj41sgj7XcFF41+WhFmsvXi1WlrCmvn/6iuUGCe?= =?iso-8859-1?Q?QHczdED8LTxYPDcE4WsIpfIRi+7nmrNIy5M+Yaw60AjjOkM/ydp9QHtsb1?= =?iso-8859-1?Q?W6+Kj8+pT60xI03vfrvemZy2GOLYywpQw7cl/+geSR3FQ2NDWKicp0J+7I?= =?iso-8859-1?Q?8TAVCI54jw9kQjmS8RwSexTXwgwLGn+ldI0BX18ovC6HgvwjS/BdlBt+Gr?= =?iso-8859-1?Q?uBvEk9wsC64es+QZl9epPvlkbWgREVuqYiG8Qe8CPGBmP7zH6QBeoGhOX7?= =?iso-8859-1?Q?Y8lz0Ml1cCRsH4EpBWFKC5LmKD6Xg6OPhYyX4Ep79fRl/cG0P+bCAx9tuE?= =?iso-8859-1?Q?nhF4T2u13u7z/a4+CCudw+OArrQ7FWxU7IveVQdKkBxrwQF89M50TwIZhH?= =?iso-8859-1?Q?VDvDcSmOVZVhf3/6ppx66+eng8ck7C7hQs1D46RU5d/t8yxVRsKgW9FrGJ?= =?iso-8859-1?Q?D9jViXqz38pMWeo2c9D35r14iDgn/4U5Y6jeC9EF0Itl8zm+mrm7dhoKPH?= =?iso-8859-1?Q?GT0jAlGzMCkIrex15lVjWaecRAUnY9kYhxTejvQIVVdCuX/7yWDF6EJcQn?= =?iso-8859-1?Q?lvpJSsJF4d2wmOv+WbQzRudEoZSmkaCMi4NBiOqKxCB/2nxVIXuL7FMl3j?= =?iso-8859-1?Q?CXsG0vN7ue8Clq00PCy8V339iefuzmf12QmwOeauruLkXoR6/TWqyApFlQ?= =?iso-8859-1?Q?f/AZs5M6RQ9BQkKZBdJuJF75+n3eHGig6NDR+6EvSGuTg5eCKZR+/mA8rx?= =?iso-8859-1?Q?zKeMWM0nXXTuYITgSgE+VbqRVVlyjfMj0HdD7o9HPJ9IUCzws97VhCCy5n?= =?iso-8859-1?Q?yqmkLWRlYWCN+yEhs7MLSYEgAffenuEPkcqqywZnzh+X0D2Cvl6Sb6PVqP?= =?iso-8859-1?Q?agjcPq2CQMSMHafJchcUJ8f1T57mJUSr6R?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5185.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 40a08c5b-1616-459b-fefa-08db047df042 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2023 17:58:35.0934 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EGeu9wagoY7a3pKR8LAFHu6YcVRPF+LqMrpTZoizjcjTY7lBAgMhSYAebn/Oed/G X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR10MB6004 Precedence: Bulk List-Unsubscribe: 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,igork@ami.com X-Gm-Message-State: EnB75NA1ddTokpDVACYgElw6x1787277AA= Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1675274320; bh=LLcoSOvQ7+B4Ue0Eqho2jiE05yMeJQOPPBisviqTssc=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=mArvauwaSFt8yjQcmotvhJhFXboeYrgO83hGcgba9ZaJSDOMsQMQhqW0/oSy/gm4NuG 6BA9pM+kx82QFrnyG21RVicRLj0D1Cvs/114TaU/tt6cepetA1UgF4HCL34UQmpKjswwo Cc1m0niwAFmzwXJ83KcEyp15rPV0neOo7Pg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1675274322072100001 Content-Type: text/plain; charset="utf-8" BIOS should be able to work with different BMC implementation. Some BMC does not support the chunked requests. So, this feature should be optional. Build time PCD was introduced to enable/disable chunked request. Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Igor Kulchytskyy --- RedfishPkg/RedfishPkg.dec | 6 + RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf | 1 + RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c | 158 +++++++++++-----= ---- 3 files changed, 96 insertions(+), 69 deletions(-) diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index d2b189b..4b4706b 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -97,3 +97,9 @@ # protocol instance. # gEfiRedfishPkgTokenSpaceGuid.PcdRedfishDiscoverAccessModeInBand|FALSE|BO= OLEAN|0x00001002 + # + # This PCD indicates if the EFI REST EX sends chunk request to Redfish s= ervice. + # Default is set to non chunk mode. + # + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExChunkRequestMode|FALSE|BOOL= EAN|0x00001003 + \ No newline at end of file diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf b/RedfishPkg/= RedfishRestExDxe/RedfishRestExDxe.inf index 75437b0..26ce167 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf @@ -57,6 +57,7 @@ [Pcd] gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceAccessModeInBand #= # CONSUMES + gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExChunkRequestMode ## CONSU= MES [UserExtensions.TianoCore."ExtraFiles"] RedfishRestExDxeExtra.uni diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c b/RedfishP= kg/RedfishRestExDxe/RedfishRestExProtocol.c index 4b61fc0..22dc5e1 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExProtocol.c @@ -66,11 +66,13 @@ RedfishRestExSendReceive ( HTTP_IO_SEND_NON_CHUNK_PROCESS SendNonChunkProcess; EFI_HTTP_MESSAGE ChunkTransferRequestMessage; - Status =3D EFI_SUCCESS; - ResponseData =3D NULL; - IsGetChunkedTransfer =3D FALSE; - SendChunkProcess =3D HttpIoSendChunkNone; - SendNonChunkProcess =3D HttpIoSendNonChunkNone; + Status =3D EFI_SUCCESS; + ResponseData =3D NULL; + IsGetChunkedTransfer =3D FALSE; + SendChunkProcess =3D HttpIoSendChunkNone; + SendNonChunkProcess =3D HttpIoSendNonChunkNone; + ItsWrite =3D FALSE; + PreservedRequestHeaders =3D NULL; // // Validate the parameters @@ -94,78 +96,96 @@ RedfishRestExSendReceive ( DEBUG ((DEBUG_INFO, "\nRedfishRestExSendReceive():\n")); DEBUG ((DEBUG_INFO, "*** Perform HTTP Request Method - %d, URL: %s\n", R= equestMessage->Data.Request->Method, RequestMessage->Data.Request->Url)); - // - // Add header "Expect" to server, only for URL write. - // - Status =3D RedfishHttpAddExpectation (This, RequestMessage, &PreservedRe= questHeaders, &ItsWrite); - if (EFI_ERROR (Status)) { - return Status; - } - - if (ItsWrite =3D=3D TRUE) { - if (RequestMessage->BodyLength > HTTP_IO_MAX_SEND_PAYLOAD) { + if(FixedPcdGetBool(PcdRedfishRestExChunkRequestMode)){ // - // Send chunked transfer. + // Add header "Expect" to server, only for URL write. // - SendChunkProcess++; - CopyMem ((VOID *)&ChunkTransferRequestMessage, (VOID *)RequestMessag= e, sizeof (EFI_HTTP_MESSAGE)); - } else { - SendNonChunkProcess++; - } + Status =3D RedfishHttpAddExpectation (This, RequestMessage, &Preserv= edRequestHeaders, &ItsWrite); + if (EFI_ERROR (Status)) { + return Status; + } + + if (ItsWrite =3D=3D TRUE) { + if (RequestMessage->BodyLength > HTTP_IO_MAX_SEND_PAYLOAD) { + // + // Send chunked transfer. + // + SendChunkProcess++; + CopyMem ((VOID *)&ChunkTransferRequestMessage, (VOID *)RequestMe= ssage, sizeof (EFI_HTTP_MESSAGE)); + } else { + SendNonChunkProcess++; + } + } } - + ReSendRequest:; - // - // Send out the request to REST service. - // - if (ItsWrite =3D=3D TRUE) { - // - // This is write to URI - // - if (SendChunkProcess > HttpIoSendChunkNone) { + + if(FixedPcdGetBool(PcdRedfishRestExChunkRequestMode)){ // - // This is chunk transfer for writing large payload. - // Send request header first and then handle the - // following request message body using chunk transfer. + // Send the chunked request to REST service. // - do { - Status =3D HttpIoSendChunkedTransfer ( + if (ItsWrite =3D=3D TRUE) { + // + // This is write to URI + // + if (SendChunkProcess > HttpIoSendChunkNone) { + // + // This is chunk transfer for writing large payload. + // Send request header first and then handle the + // following request message body using chunk transfer. + // + do { + Status =3D HttpIoSendChunkedTransfer ( + &(Instance->HttpIo), + &SendChunkProcess, + &ChunkTransferRequestMessage + ); + if (EFI_ERROR (Status)) { + goto ON_EXIT; + } + } while (SendChunkProcess =3D=3D HttpIoSendChunkContent || SendC= hunkProcess =3D=3D HttpIoSendChunkEndChunk); + } else { + // + // This is the non-chunk transfer, send request header first and= then + // handle the following request message body using chunk transfe= r. + // + Status =3D HttpIoSendRequest ( + &(Instance->HttpIo), + (SendNonChunkProcess =3D=3D HttpIoSendNonChunkContent= ) ? NULL : RequestMessage->Data.Request, + (SendNonChunkProcess =3D=3D HttpIoSendNonChunkContent= ) ? 0 : RequestMessage->HeaderCount, + (SendNonChunkProcess =3D=3D HttpIoSendNonChunkContent= ) ? NULL : RequestMessage->Headers, + (SendNonChunkProcess =3D=3D HttpIoSendNonChunkHeaderZ= eroContent) ? 0 : RequestMessage->BodyLength, + (SendNonChunkProcess =3D=3D HttpIoSendNonChunkHeaderZ= eroContent) ? NULL : RequestMessage->Body + ); + } + } else { + // + // This is read from URI. + // + Status =3D HttpIoSendRequest ( &(Instance->HttpIo), - &SendChunkProcess, - &ChunkTransferRequestMessage + RequestMessage->Data.Request, + RequestMessage->HeaderCount, + RequestMessage->Headers, + RequestMessage->BodyLength, + RequestMessage->Body ); - if (EFI_ERROR (Status)) { - goto ON_EXIT; - } - } while (SendChunkProcess =3D=3D HttpIoSendChunkContent || SendChunk= Process =3D=3D HttpIoSendChunkEndChunk); - } else { + } + } + else{ // - // This is the non-chunk transfer, send request header first and then - // handle the following request message body using chunk transfer. + // This is normal request to URI. // Status =3D HttpIoSendRequest ( &(Instance->HttpIo), - (SendNonChunkProcess =3D=3D HttpIoSendNonChunkContent) ? = NULL : RequestMessage->Data.Request, - (SendNonChunkProcess =3D=3D HttpIoSendNonChunkContent) ? = 0 : RequestMessage->HeaderCount, - (SendNonChunkProcess =3D=3D HttpIoSendNonChunkContent) ? = NULL : RequestMessage->Headers, - (SendNonChunkProcess =3D=3D HttpIoSendNonChunkHeaderZeroC= ontent) ? 0 : RequestMessage->BodyLength, - (SendNonChunkProcess =3D=3D HttpIoSendNonChunkHeaderZeroC= ontent) ? NULL : RequestMessage->Body + RequestMessage->Data.Request, + RequestMessage->HeaderCount, + RequestMessage->Headers, + RequestMessage->BodyLength, + RequestMessage->Body ); - } - } else { - // - // This is read from URI. - // - Status =3D HttpIoSendRequest ( - &(Instance->HttpIo), - RequestMessage->Data.Request, - RequestMessage->HeaderCount, - RequestMessage->Headers, - RequestMessage->BodyLength, - RequestMessage->Body - ); } - + if (EFI_ERROR (Status)) { goto ON_EXIT; } @@ -213,7 +233,7 @@ ReSendRequest:; // // Restore the headers if it ever changed in RedfishHttpAddExpectation(). // - if (RequestMessage->Headers !=3D PreservedRequestHeaders) { + if (FixedPcdGetBool(PcdRedfishRestExChunkRequestMode) && RequestMessage-= >Headers !=3D PreservedRequestHeaders) { FreePool (RequestMessage->Headers); RequestMessage->Headers =3D PreservedRequestHeaders; // Restore header= s before we adding "Expect". RequestMessage->HeaderCount--; // Minus one header= count for "Expect". @@ -223,8 +243,8 @@ ReSendRequest:; if (ResponseData->Response.StatusCode =3D=3D HTTP_STATUS_200_OK) { DEBUG ((DEBUG_INFO, "HTTP_STATUS_200_OK\n")); - if (SendChunkProcess =3D=3D HttpIoSendChunkHeaderZeroContent) { - DEBUG ((DEBUG_INFO, "This is chunk transfer, start to send all chunk= s.")); + if (FixedPcdGetBool(PcdRedfishRestExChunkRequestMode) && SendChunkProc= ess =3D=3D HttpIoSendChunkHeaderZeroContent) { + DEBUG ((DEBUG_INFO, "This is chunk transfer, start to send all chunk= s.", ResponseData->Response.StatusCode)); SendChunkProcess++; goto ReSendRequest; } @@ -240,14 +260,14 @@ ReSendRequest:; goto ON_EXIT; } else if (ResponseData->Response.StatusCode =3D=3D HTTP_STATUS_400_BAD_= REQUEST) { DEBUG ((DEBUG_INFO, "HTTP_STATUS_400_BAD_REQUEST\n")); - if (SendChunkProcess =3D=3D HttpIoSendChunkHeaderZeroContent) { + if (FixedPcdGetBool(PcdRedfishRestExChunkRequestMode) && SendChunkProc= ess =3D=3D HttpIoSendChunkHeaderZeroContent) { DEBUG ((DEBUG_INFO, "Bad request may caused by zero length chunk. Tr= y to send all chunks...\n")); SendChunkProcess++; goto ReSendRequest; } } else if (ResponseData->Response.StatusCode =3D=3D HTTP_STATUS_100_CONT= INUE) { DEBUG ((DEBUG_INFO, "HTTP_STATUS_100_CONTINUE\n")); - if (SendChunkProcess =3D=3D HttpIoSendChunkHeaderZeroContent) { + if (FixedPcdGetBool(PcdRedfishRestExChunkRequestMode) && SendChunkProc= ess =3D=3D HttpIoSendChunkHeaderZeroContent) { // // We get HTTP_STATUS_100_CONTINUE to send the body using chunk tran= sfer. // @@ -256,7 +276,7 @@ ReSendRequest:; goto ReSendRequest; } - if (SendNonChunkProcess =3D=3D HttpIoSendNonChunkHeaderZeroContent) { + if (FixedPcdGetBool(PcdRedfishRestExChunkRequestMode) && SendNonChunkP= rocess =3D=3D HttpIoSendNonChunkHeaderZeroContent) { DEBUG ((DEBUG_INFO, "HTTP_STATUS_100_CONTINUE for non chunk transfer= ...\n")); SendNonChunkProcess++; goto ReSendRequest; -- 2.6.1.windows.1 -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission. -=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 (#99411): https://edk2.groups.io/g/devel/message/99411 Mute This Topic: https://groups.io/mt/96682465/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-