greenplumn s3http_headers 源码

  • 2022-08-18
  • 浏览 (500)

greenplumn s3http_headers 代码

文件路径:/gpcontrib/gpcloud/include/s3http_headers.h

#ifndef __S3_HTTP_HEADERS_H__
#define __S3_HTTP_HEADERS_H__

#include "s3common_headers.h"

enum HeaderField {
    HOST,
    RANGE,
    DATE,
    CONTENTLENGTH,
    CONTENTMD5,
    CONTENTTYPE,
    EXPECT,
    AUTHORIZATION,
    ETAG,
    X_AMZ_DATE,
    X_AMZ_CONTENT_SHA256,
    X_AMZ_SERVER_SIDE_ENCRYPTION,
};

// HTTPHeaders wraps curl_slist using std::map to ease manipulating HTTP
// headers.
class HTTPHeaders {
   public:
    HTTPHeaders();
    ~HTTPHeaders();

    bool Add(HeaderField f, const string& value);
    void Disable(HeaderField f);
    const char* Get(HeaderField f);

    void CreateList();
    struct curl_slist* GetList();
    void FreeList();

   private:
    struct curl_slist* header_list;

    std::map<HeaderField, string> fields;
    std::set<HeaderField> disabledFields;
};

const char* GetFieldString(HeaderField f);

#endif

相关信息

greenplumn 源码目录

相关文章

greenplumn compress_writer 源码

greenplumn decompress_reader 源码

greenplumn gpcheckcloud 源码

greenplumn gpcommon 源码

greenplumn gpreader 源码

greenplumn gpwriter 源码

greenplumn reader 源码

greenplumn restful_service 源码

greenplumn s3bucket_reader 源码

greenplumn s3common_headers 源码

0  赞