summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E. Blair <jeblair@redhat.com>2019-03-05 08:44:04 -0800
committerJames E. Blair <jeblair@redhat.com>2019-03-05 08:44:46 -0800
commit4db7857bc59dc5b6c88d71109a4689a73c359552 (patch)
treeaa581011002f84c4d368c8bdbf07adf733793bb6
parentf5121119c861901da32b19da868bd0eb5dde16e1 (diff)
Return NULL on all errorsHEADmaster
This is what the mod_rewrite documentation says we should return if we are unable to map the URL. Change-Id: Ifec0a5eb6076e36eb32bb67e0eca6ea4df3a7b13
Notes
Notes (review): Code-Review+2: Monty Taylor <mordred@inaugust.com> Code-Review+2: Jeremy Stanley <fungi@yuggoth.org> Workflow+1: Jeremy Stanley <fungi@yuggoth.org> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 05 Mar 2019 17:08:54 +0000 Reviewed-on: https://review.openstack.org/641078 Project: openstack-infra/zuul-preview Branch: refs/heads/master
-rw-r--r--zuul-preview/main.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/zuul-preview/main.cc b/zuul-preview/main.cc
index f15df88..8bfa4d5 100644
--- a/zuul-preview/main.cc
+++ b/zuul-preview/main.cc
@@ -128,7 +128,7 @@ int main(int, char**)
128 // Split the input into api_url, hostname 128 // Split the input into api_url, hostname
129 auto parts = split(input, ' '); 129 auto parts = split(input, ' ');
130 if (parts.size() != 2) { 130 if (parts.size() != 2) {
131 cout << "Wrong number of args" << endl; 131 cout << "NULL" << endl;
132 continue; 132 continue;
133 } 133 }
134 auto api_url = parts[0]; 134 auto api_url = parts[0];
@@ -144,7 +144,7 @@ int main(int, char**)
144 // build url. 144 // build url.
145 parts = split(hostname, '.'); 145 parts = split(hostname, '.');
146 if (parts.size() < 3) { 146 if (parts.size() < 3) {
147 cout << "Not enough hostname parts" << endl; 147 cout << "NULL" << endl;
148 continue; 148 continue;
149 } 149 }
150 auto artifact = parts[0]; 150 auto artifact = parts[0];
@@ -179,7 +179,7 @@ int main(int, char**)
179 // If anything goes wrong, we still need to return only a single 179 // If anything goes wrong, we still need to return only a single
180 // string to apache, and recover for the next request, so we 180 // string to apache, and recover for the next request, so we
181 // have a general exception handler here. 181 // have a general exception handler here.
182 cout << "Error" << endl; 182 cout << "NULL" << endl;
183 } 183 }
184 } 184 }
185} 185}