Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions proxy/hdrs/HTTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,14 +464,15 @@ HTTPValTE *http_parse_te(const char *buf, int len, Arena *arena);
class HTTPVersion
{
public:
HTTPVersion();
HTTPVersion() = default;
HTTPVersion(HTTPVersion const &that) = default;
explicit HTTPVersion(int32_t version);
HTTPVersion(int ver_major, int ver_minor);

void set(HTTPVersion ver);
void set(int ver_major, int ver_minor);

HTTPVersion &operator=(const HTTPVersion &hv);
HTTPVersion &operator=(const HTTPVersion &hv) = default;
int operator==(const HTTPVersion &hv) const;
int operator!=(const HTTPVersion &hv) const;
int operator>(const HTTPVersion &hv) const;
Expand All @@ -480,7 +481,7 @@ class HTTPVersion
int operator<=(const HTTPVersion &hv) const;

public:
int32_t m_version;
int32_t m_version{HTTP_VERSION(1, 0)};
};

class IOBufferReader;
Expand Down Expand Up @@ -654,11 +655,6 @@ class HTTPHdr : public MIMEHdr
friend class UrlPrintHack; // don't ask.
};

/*-------------------------------------------------------------------------
-------------------------------------------------------------------------*/

inline HTTPVersion::HTTPVersion() : m_version(HTTP_VERSION(1, 0)) {}

/*-------------------------------------------------------------------------
-------------------------------------------------------------------------*/

Expand Down Expand Up @@ -687,17 +683,6 @@ HTTPVersion::set(int ver_major, int ver_minor)
m_version = HTTP_VERSION(ver_major, ver_minor);
}

/*-------------------------------------------------------------------------
-------------------------------------------------------------------------*/

inline HTTPVersion &
HTTPVersion::operator=(const HTTPVersion &hv)
{
m_version = hv.m_version;

return *this;
}

/*-------------------------------------------------------------------------
-------------------------------------------------------------------------*/

Expand Down