From 299510263cbfa1759f8da66a4518340fc5b1cc2d Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Thu, 4 Aug 2016 16:29:51 +0200 Subject: [PATCH] rgw: ONLY improve formatting in the FCGI frontend. Signed-off-by: Radoslaw Zarzynski --- src/rgw/rgw_fcgi.cc | 10 +++++----- src/rgw/rgw_fcgi.h | 27 +++++++++++++++++---------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/rgw/rgw_fcgi.cc b/src/rgw/rgw_fcgi.cc index 2db97dd73952..95f945d7c496 100644 --- a/src/rgw/rgw_fcgi.cc +++ b/src/rgw/rgw_fcgi.cc @@ -5,12 +5,12 @@ #include "acconfig.h" -int RGWFCGX::write_data(const char *buf, int len) +int RGWFCGX::write_data(const char* const buf, const int len) { return FCGX_PutStr(buf, len, fcgx->out); } -int RGWFCGX::read_data(char *buf, int len) +int RGWFCGX::read_data(char* const buf, const int len) { return FCGX_GetStr(buf, len, fcgx->in); } @@ -20,12 +20,12 @@ void RGWFCGX::flush() FCGX_FFlush(fcgx->out); } -void RGWFCGX::init_env(CephContext *cct) +void RGWFCGX::init_env(CephContext* const cct) { env.init(cct, (char **)fcgx->envp); } -int RGWFCGX::send_status(int status, const char *status_name) +int RGWFCGX::send_status(const int status, const char* const status_name) { static constexpr size_t STATUS_BUF_SIZE = 128; @@ -45,7 +45,7 @@ int RGWFCGX::send_100_continue() return r; } -int RGWFCGX::send_content_length(uint64_t len) +int RGWFCGX::send_content_length(const uint64_t len) { static constexpr size_t CONLEN_BUF_SIZE = 128; diff --git a/src/rgw/rgw_fcgi.h b/src/rgw/rgw_fcgi.h index f49c3586125a..046dbb53e1f5 100644 --- a/src/rgw/rgw_fcgi.h +++ b/src/rgw/rgw_fcgi.h @@ -17,21 +17,28 @@ class RGWFCGX : public RGWStreamIOEngine RGWEnv env; public: - void init_env(CephContext *cct); - int write_data(const char *buf, int len); - int read_data(char *buf, int len); - - int send_status(int status, const char *status_name); - int send_100_continue(); - int complete_header(); - int complete_request() { return 0; } - int send_content_length(uint64_t len); - explicit RGWFCGX(FCGX_Request *_fcgx) : fcgx(_fcgx) {} + explicit RGWFCGX(FCGX_Request* const fcgx) + : fcgx(fcgx) { + } + + void init_env(CephContext* cct) override; + int read_data(char* buf, int len) override; + int write_data(const char* buf, int len) override; + + int send_status(int status, const char* status_name) override; + int send_100_continue() override; + int send_content_length(uint64_t len) override; + int complete_header() override; + void flush(); RGWEnv& get_env() override { return env; } + + int complete_request() override { + return 0; + } }; #endif -- 2.47.3