Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@maps.me>2015-07-02 15:03:01 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:53:54 +0300
commit950162db9a7117ac18d838baeb5de5707b425572 (patch)
treec48dc3a64bbce108482d8b0bfe88790e63503d7a /3party/Alohalytics/server/fcgi_server.cc
parent010b70ea9f6ad64a876f95a5aa33091fc17c4d77 (diff)
[alohalytics] Code Review fixes.
Diffstat (limited to '3party/Alohalytics/server/fcgi_server.cc')
-rw-r--r--3party/Alohalytics/server/fcgi_server.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/3party/Alohalytics/server/fcgi_server.cc b/3party/Alohalytics/server/fcgi_server.cc
index 12c8269885..eb432e9fa2 100644
--- a/3party/Alohalytics/server/fcgi_server.cc
+++ b/3party/Alohalytics/server/fcgi_server.cc
@@ -31,7 +31,6 @@
// $http_content_encoding should be set to gzip
#include <chrono>
-
#include <cstdlib>
#include <ctime>
#include <exception>
@@ -92,18 +91,15 @@ int main(int argc, char * argv[]) {
}
const char * user_agent_str = FCGX_GetParam("HTTP_USER_AGENT", request.envp);
- if (user_agent_str) {
- } else {
+ if (!user_agent_str) {
ALOG("WARNING: Missing HTTP User-Agent.");
}
const char * request_uri_str = FCGX_GetParam("REQUEST_URI", request.envp);
- if (request_uri_str) {
- } else {
+ if (!request_uri_str) {
ALOG("WARNING: Missing REQUEST_URI.");
}
const char * remote_addr_str = FCGX_GetParam("REMOTE_ADDR", request.envp);
- if (remote_addr_str) {
- } else {
+ if (!remote_addr_str) {
ALOG("WARNING: Missing REMOTE_ADDR.");
}
@@ -115,7 +111,7 @@ int main(int argc, char * argv[]) {
FCGX_FPrintF(request.out, "Status: 200 OK\r\nContent-Type: text/plain\r\nContent-Length: %ld\r\n\r\n%s\n",
kBodyTextInSuccessfulServerReply.size(), kBodyTextInSuccessfulServerReply.c_str());
- } catch (const std::exception & ex) {
+ } catch (const exception & ex) {
ALOG("ERROR: Exception while processing request: ", ex.what());
FCGX_FPrintF(request.out,
"Status: 500 Internal Server Error\r\nContent-Type: text/plain\r\n\r\n500 Internal Server Error\n");