Page MenuHomePhabricator

D14226.id34351.diff
No OneTemporary

D14226.id34351.diff

diff --git a/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php b/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
--- a/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
+++ b/src/applications/harbormaster/step/HarbormasterHTTPRequestBuildStepImplementation.php
@@ -75,6 +75,12 @@
list($status, $body, $headers) = $future->resolve();
$header_lines = array();
+
+ // TODO: We don't currently preserve the entire "HTTP" response header, but
+ // should. Once we do, reproduce it here faithfully.
+ $status_code = $status->getStatusCode();
+ $header_lines[] = "HTTP {$status_code}";
+
foreach ($headers as $header) {
list($head, $tail) = $header;
$header_lines[] = "{$head}: {$tail}";
@@ -89,7 +95,7 @@
->newLog($uri, 'http.body')
->append($body);
- if ($status->getStatusCode() != 200) {
+ if ($status->isError()) {
throw new HarbormasterBuildFailureException();
}
}

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 23, 12:51 AM (2 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7627566
Default Alt Text
D14226.id34351.diff (1 KB)

Event Timeline