#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);
}
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;
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;
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