Unexpected output: Affected paths: relative - resubmit patch.
⚙ D423 INP-1819 - Allow retrieving response headers after making the cURL request
Page MenuHomeIn-Portal Phabricator

INP-1819 - Allow retrieving response headers after making the cURL request
ClosedPublic

Authored by alex on Aug 5 2022, 6:42 AM.

Details

Test Plan
  • anywhere
    • apply patch from the D422
  • in IDE:
    • open /index.php file for editing
    • replace $application->Run(); line with the following code:
/** @var kCurlHelper $curl_helper */
$curl_helper = $application->recallObject('CurlHelper');

$curl_helper->Send('http://www.google.com', false);
echo '<pre>', print_r($curl_helper->getResponseHeaders(), true), '</pre>';
$curl_helper->CloseConnection();
    • save changes
  • in Web Browser:
    • open /index.php
    • confirm, that page output contains this text (some array elements can be different, but the Location: ... line should be the same; the [3] => ... line was modified, because Phabricator was thinking that it contains an error)
Array
(
    [0] => HTTP/1.1 302 Found
    [1] => Location: https://www.google.com/?gws_rd=ssl
    [2] => Cache-Control: private
    [3] => Content-Type: ...
    [4] => Date: Fri, 05 Aug 2022 11:41:34 GMT
    [5] => Server: gws
    [6] => Content-Length: 231
    [7] => X-XSS-Protection: 0
    [8] => X-Frame-Options: SAMEORIGIN
    [9] => Set-Cookie: AEC=AakniGPnzy9fNDmUjeXGLYwlt9k3NWL-v0Cik0kAz2sN2vpv59iUmUuZcsQ; expires=Wed, 01-Feb-2023 11:41:34 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
)

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint ErrorsExcuse: Not fixing, because haven't broken anything.
SeverityLocationCodeMessage
Errorcore/units/helpers/curl_helper.php:164PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/helpers/curl_helper.php:164PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/units/helpers/curl_helper.php:165PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/helpers/curl_helper.php:165PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/units/helpers/curl_helper.php:166PHPCS.E.CodingStandard.Arrays.Array.SpaceAfterKeywordCodingStandard.Arrays.Array.SpaceAfterKeyword
Errorcore/units/helpers/curl_helper.php:166PHPCS.E.Generic.PHP.LowerCaseKeyword.FoundGeneric.PHP.LowerCaseKeyword.Found
Errorcore/units/helpers/curl_helper.php:586PHPCS.E.CodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBraceCodingStandard.Classes.ClassDeclaration.SpaceBeforeCloseBrace
Unit
No Unit Test Coverage
Build Status
Buildable 1112
Build 1112: arc lint + arc unit

Event Timeline

alex created this revision.Aug 5 2022, 6:42 AM
alex requested review of this revision.Aug 5 2022, 6:42 AM
alex edited the test plan for this revision. (Show Details)Aug 5 2022, 6:47 AM
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)
erik accepted this revision.Aug 9 2022, 5:52 AM
This revision is now accepted and ready to land.Aug 9 2022, 5:52 AM
This revision was landed with ongoing or failed builds.Nov 9 2022, 9:53 AM
This revision was automatically updated to reflect the committed changes.