From: Radoslaw Zarzynski Date: Thu, 4 Aug 2016 14:29:51 +0000 (+0200) Subject: rgw: ONLY improve formatting in the FCGI frontend. X-Git-Tag: v11.1.0~454^2~40 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=299510263cbfa1759f8da66a4518340fc5b1cc2d;p=ceph.git rgw: ONLY improve formatting in the FCGI frontend. Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/rgw/rgw_fcgi.cc b/src/rgw/rgw_fcgi.cc index 2db97dd7395..95f945d7c49 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 f49c3586125..046dbb53e1f 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