]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_fcgi.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab ft=cpp
4 #ifndef CEPH_RGW_FCGI_H
5 #define CEPH_RGW_FCGI_H
10 #include "rgw_client_io.h"
14 class RGWFCGX
: public rgw::io::RestfulClient
,
15 public rgw::io::BuffererSink
{
19 rgw::io::StaticOutputBufferer
<> txbuf
;
21 size_t read_data(char* buf
, size_t len
);
22 size_t write_data(const char* buf
, size_t len
) override
;
25 explicit RGWFCGX(FCGX_Request
* const fcgx
)
30 int init_env(CephContext
* cct
) override
;
31 size_t send_status(int status
, const char* status_name
) override
;
32 size_t send_100_continue() override
;
33 size_t send_header(const boost::string_ref
& name
,
34 const boost::string_ref
& value
) override
;
35 size_t send_content_length(uint64_t len
) override
;
36 size_t complete_header() override
;
38 size_t recv_body(char* buf
, size_t max
) override
{
39 return read_data(buf
, max
);
42 size_t send_body(const char* buf
, size_t len
) override
{
43 return write_data(buf
, len
);
46 void flush() override
;
48 RGWEnv
& get_env() noexcept override
{
52 size_t complete_request() override
{