From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.107.100.40]) by mx.groups.io with SMTP id smtpd.web11.31320.1675274544627264448 for ; Wed, 01 Feb 2023 10:02:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ami.com header.s=selector1 header.b=N9ZrRWKj; spf=pass (domain: ami.com, ip: 40.107.100.40, mailfrom: igork@ami.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U5DQ/KxypdPoDsop8Hr3caV7e4YkO5WpJA9RbOI13aBg8OL1bE/CmAiig0+dSpbA4HLelPCUQlvGq37jQsSeuMcif+q+2Jiu2sE6Blo6QTdNz6aP+7vThOGQvEQZxAziZCuMOiHNqhvsHFKv/CDnry1qw9gI/owQrT9r7NjQk041cQ+Vr5pA7XehjeTYdqcJAIX74B5YUSkOtzUDqoVB/lHy0qwnKcYu8XuIafV2cz2eIzaJbe6WbKYFfRMsLsCrCJH337hZ7aujs0lDzdiS5HKtoW+KGj+yDh7oG5q3hL4PVUwDBgdvS229NvAwZiy32RtaSYDkv+5s1EpOdHoKwA== 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=HmN2n+Rs9pTq8NtLjtMf35JBEbQU3MxizNMZAL20Eow=; b=iFhIwdRzUuudPjj/R1Mbsj1MB5brObUKLAeQUFmWJHG5WyDYgbBm96zXh1U5o82Jt0OefMx5SCh0U/5QvzcEuvHZOZtKtxbUrAspxnS3liGTTnxJKwodnILzuInPwULgFnZgMZNZ/OJWyYMubnqn96jDfZi6GQjf9Po0/oVw6X0IZqt34b+ZTeWMlWOGgVFzY49fDP9IyF2S4tlhHefMh0xbRlIbzqgux8ZUZP6nP3cmXNWedfyIn/9vjheQL5KAk8ekTjW5L7H/aXUQsgRORE1QoZF6Xzkv5qZOMGrx5t4Xs1w0QMWP6ChlxnjcSgqm43w152FVBhk/pG58gxAEgA== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ami.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HmN2n+Rs9pTq8NtLjtMf35JBEbQU3MxizNMZAL20Eow=; b=N9ZrRWKj0I8aUbOppipgy9IpFqxBy5s0Z0zHImK4pamJMGrOJ3QzlzimJ5NHrV8uTr5YL5kDmpjBtby27shz4tqJKyWPeAECVe0e3/VbOL2Tuh89y1aXFQSGwpbcKVrhIczW824J8qZMV+uIPuKe+lFgeAbHfxj93ZQRws/Viws= Received: from BLAPR10MB5185.namprd10.prod.outlook.com (2603:10b6:208:328::16) by MW4PR10MB6583.namprd10.prod.outlook.com (2603:10b6:303:228::7) 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 18:02:21 +0000 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 18:02:21 +0000 From: "Igor Kulchytskyy" To: "devel@edk2.groups.io" , Igor Kulchytskyy CC: Abner Chang , Nickle Wang Subject: Re: [edk2-devel] [PATCH] RedfishPkg: RedfishRestExDxe: PCD introduced to disable chunked reguest Thread-Topic: [EXTERNAL] [edk2-devel] [PATCH] RedfishPkg: RedfishRestExDxe: PCD introduced to disable chunked reguest Thread-Index: AQHZNmbN8RqcSVRMHUesVmEbiJwDmK66YWow Date: Wed, 1 Feb 2023 18:02:21 +0000 Message-ID: References: <173FC51E51BF8284.30239@groups.io> In-Reply-To: <173FC51E51BF8284.30239@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ami.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BLAPR10MB5185:EE_|MW4PR10MB6583:EE_ x-ms-office365-filtering-correlation-id: 2658f65a-8a43-4b98-9cf4-08db047e7749 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: PTKAI60H/dMvoDG8EKON0gVhRECku0eEaGLc/6L/nauZCLB8ZaQoflu57pK7gsj+Xn8gWCOY0x0r15VzfptJ/bCQm8g0hk/ywEYLKHjHrMCOeCTee+FY0mikC8KJwcJbIgOIMHC2EoCupPMZyiFSH1xnYIGcm5YnhVVWw6KlzVdfCcL021FEvAl86394P98Tspw13zVR1R13cRdVpIXMq/REel2SfhBfstt8onx8tbL7QD3WALjpNByK+M8Ez0wGmrBoBCY0hwsytcaNlBcXyEdjLUXAp68iavKV06evHRJod63KTY1Hy5/lN4HTP7Zh7F0QB33Dr/HYijbSgeMgfYRTqrI69syHZ1W/SqJDoxx2gMD+s0FLMSIisRto0wNDhLCTO0+7/UsZfyR8xRWViKLrIBpi6cqJVbEVQabKH7jhBupb6XGxTct+xWT589n+f8W7jNixGLTn9ZL//A+k25eC7jNXQ2eAY6yH4P+hIWbsW9/IwevS7ZIMSVgeYcct3EUAGwzTjoZOHYc+TzO6iPkYJaJOHl0NTKw2O64To0jCKO3EkHpttcXobIlyxVupFU77A3IAXFm48VrCHo4zQx1AZDoRgIsHPVzGHoeWzEvrEGG7cfIm8E777O0AzXOS/fQ/6BoLFnPMJp+b/rlxpSbEMBOaIyEHwCjXS1QF/oIXLWTVGi1crXOQZhDdrIqP+BumXc5RsB1d74/0ukL/Muk4FYVlqeuWWJHN+GSeCq4= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BLAPR10MB5185.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(6029001)(4636009)(39850400004)(376002)(136003)(396003)(366004)(346002)(451199018)(83380400001)(9686003)(186003)(110136005)(26005)(54906003)(45080400002)(33656002)(316002)(2906002)(40140700001)(30864003)(966005)(53546011)(66899018)(38100700002)(8676002)(66476007)(478600001)(55016003)(64756008)(66556008)(86362001)(6506007)(4326008)(66446008)(122000001)(66946007)(7696005)(71200400001)(8936002)(41300700001)(38070700005)(5660300002)(52536014)(76116006);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZIQNQg7qeIM1dc7CdA3yGfVz+WAHZ0ndvwlaXOvi0LrmSS9axM5osQ06omcM?= =?us-ascii?Q?41CoXe4fisuamHI//U+SzQvnli69nrXom1FliqJVJT+9TeL0DdQSJTAQ0Lwa?= =?us-ascii?Q?uRg8jF36jSau8QMHH+bxFLjfg6I/dB0nJC+1P6zwaEWPFx0RtaYLKpjR1jo7?= =?us-ascii?Q?yZQHFGhKc9f+T24kg5igiesXvjDakiVd6e+yvdyH9QMknLwENa0D7W9EyYc5?= =?us-ascii?Q?FrPq4+Rfq0alWyzuu0VWSEwxQBu26gLrlu47PLnHHN8VsEvt4jLpprwXKKEY?= =?us-ascii?Q?LIEtap1r/6SxtWnlpC9me9l9/x//qPyyjfNbWYvS4oLO+/5bAnA3COZFcmtJ?= =?us-ascii?Q?9d9NXUeJCYh03OC+8cN9J7BrsvYxut4QOc7qYAvUox3suN2USHsI7I+DlNKe?= =?us-ascii?Q?tSClUhFfo1G0g2u7qE0DyRuXXpJAlzHDIVTqFD6hkJsD4YcJoHFZZuoWN7XV?= =?us-ascii?Q?sifg9T58WePIZuAShqidcATYP06b3iaJndW6/dDQa7aud8fgfQ1m/4GopEzE?= =?us-ascii?Q?cJk0BWLJWjZdOP/9lVRCPPZq1MvnivVWj1RkloP8SHp2PSERkKJaL89zJzr4?= =?us-ascii?Q?GSeT2sBT3mkOXsEqpWvrnon8XCQp6ylvlGwtHxOliLVNPDN1UUGpDMF8K/Nw?= =?us-ascii?Q?FUsByNZbOTRwet7TYRPEJHnc5tuIuBgdeZeek0MsgPcZQyk0WamcHAhE7Ddm?= =?us-ascii?Q?UORsIfpVsIia+JHE3UFIBtDL4jMa85dFpGO328xajG8BYVta5F4uaEz3e2Au?= =?us-ascii?Q?OTZeKcGYqrazJxLO6pLsYtKhNeSgzFOkiE59D4NkPbX4FwkWLu5+5RlNkNbA?= =?us-ascii?Q?8TYzNr9DkFpanQWPSAR3C9oDz9kTLJz9kP0NLehXvC9rAGukxUJsenIN6NAu?= =?us-ascii?Q?qJR9PePq/tr3hARR95nsUQBXYpJn+gBrvctI+8KiHNTdY0PIRdU5LU63cGSi?= =?us-ascii?Q?vMPw9kCM6NpuW3+jnjPFxR4dShCtCXM731uaBSRfg4lGnLHff3hnTy2kWWAz?= =?us-ascii?Q?GsP6sKkywkJWDjaR9NtHTvcHFsDtK4ShQHj3SkOpeW3dYuPFQxkza3nwnu7s?= =?us-ascii?Q?+ftDw1DcgXkDXWE1e80B7MIeBJo0SlSr8MLVrpQcgr15oneqcKmp0prsl5Ng?= =?us-ascii?Q?lhMmdMCVf9uCgrt1NWp7FfSE7Ck8Tz2X7PZQZK3n54dP/kMDW388tJOI3knB?= =?us-ascii?Q?B6djJ16qiNPlJkI2CNym4LZvL1Oqsikw24BQA68Xtw/zSTXGpPBrRoPZ3Pp0?= =?us-ascii?Q?WfnG3Igcem+AmAvDV3zvFOXcjzw2TEAvlG3IoGXEJK/g62bX1fmcr9W1wTgw?= =?us-ascii?Q?5FL5YaXwkDteYf1wrX8Ptwf50WJPvB7oyFoSwdv2rB6aYPCRGPTYgUH1YI9d?= =?us-ascii?Q?l9dshoiGYVrxSW9DU51wIa84+GiMqOhbMYF+41ujmce56i9tNFo8zeqKXJXg?= =?us-ascii?Q?wUAwsIzaMcepnovS9oSl2c1Pt7+2D1wARFQupKg5opvtsYkThK/dvsaTdlrj?= =?us-ascii?Q?biW7no4U4nu2b/mRTM8yIKq+9jIAcF5R0JXJkHe3HFxRMpblzWhSVCOTXahh?= =?us-ascii?Q?cO3QQHDRMZbupA+vnIY=3D?= 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: 2658f65a-8a43-4b98-9cf4-08db047e7749 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Feb 2023 18:02:21.6604 (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: 9i0pDJmLV8KpWJIZAib7swahpitpoEWECeQBGr4e/rYHqCv+jTuBk4OpJUXDgq/4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR10MB6583 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Nickle, Sorry, first time I sent this patch to your previous email address. Thank you, Igor -----Original Message----- From: devel@edk2.groups.io On Behalf Of Igor Kulchyt= skyy via groups.io Sent: Wednesday, February 01, 2023 12:59 PM To: devel@edk2.groups.io Cc: Igor Kulchytskyy ; Abner Chang ; Ni= ckle Wang Subject: [EXTERNAL] [edk2-devel] [PATCH] RedfishPkg: RedfishRestExDxe: PCD = introduced to disable chunked reguest **CAUTION: The e-mail below is from an external source. Please exercise cau= tion before opening attachments, clicking links, or following guidance.** 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 d2= b189b..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|BO + OLEAN|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 the= n - // 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 + chunks.", 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) && + SendChunkProcess =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) && + SendChunkProcess =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) && + SendNonChunkProcess =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= . -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= .