@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Minor improvements to handling Aphlict status code

Summary: Self explanatory.

Test Plan: `curl`ed a few URLs.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11147

+4 -8
+4 -8
support/aphlict/server/aphlict_server.js
··· 206 206 '<%s> Internal Server Error! %s', 207 207 request.socket.remoteAddress, 208 208 err); 209 - response.statusCode = 500; 210 - response.write('500 Internal Server Error\n'); 209 + response.writeHead(500, 'Internal Server Error'); 211 210 } 212 211 } catch (err) { 213 212 debug.log( 214 213 '<%s> Bad Request! %s', 215 214 request.socket.remoteAddress, 216 215 err); 217 - response.statusCode = 400; 218 - response.write('400 Bad Request\n'); 216 + response.writeHead(400, 'Bad Request'); 219 217 } finally { 220 218 response.end(); 221 219 } 222 220 }); 223 221 } else { 224 - response.statusCode = 405; 225 - response.write('405 Method Not Allowed\n'); 222 + response.writeHead(405, 'Method Not Allowed'); 226 223 response.end(); 227 224 } 228 225 } else if (request.url == '/status/') { ··· 240 237 response.write(JSON.stringify(status)); 241 238 response.end(); 242 239 } else { 243 - response.statusCode = 404; 244 - response.write('404 Not Found\n'); 240 + response.writeHead(404, 'Not Found'); 245 241 response.end(); 246 242 } 247 243 }).listen(config.admin, config.host);