Browse Source

Return NULL on all errors

This is what the mod_rewrite documentation says we should return
if we are unable to map the URL.

Change-Id: Ifec0a5eb6076e36eb32bb67e0eca6ea4df3a7b13
changes/78/641078/1
James E. Blair 2 months ago
parent
commit
4db7857bc5
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      zuul-preview/main.cc

+ 3
- 3
zuul-preview/main.cc View File

@@ -128,7 +128,7 @@ int main(int, char**)
128 128
     // Split the input into api_url, hostname
129 129
     auto parts = split(input, ' ');
130 130
     if (parts.size() != 2) {
131
-      cout << "Wrong number of args" << endl;
131
+      cout << "NULL" << endl;
132 132
       continue;
133 133
     }
134 134
     auto api_url = parts[0];
@@ -144,7 +144,7 @@ int main(int, char**)
144 144
     // build url.
145 145
     parts = split(hostname, '.');
146 146
     if (parts.size() < 3) {
147
-      cout << "Not enough hostname parts" << endl;
147
+      cout << "NULL" << endl;
148 148
       continue;
149 149
     }
150 150
     auto artifact = parts[0];
@@ -179,7 +179,7 @@ int main(int, char**)
179 179
       // If anything goes wrong, we still need to return only a single
180 180
       // string to apache, and recover for the next request, so we
181 181
       // have a general exception handler here.
182
-      cout << "Error" << endl;
182
+      cout << "NULL" << endl;
183 183
     }
184 184
   }
185 185
 }

Loading…
Cancel
Save