Skip to content

Commit

Permalink
Merge pull request #13504 from rzarzynski/wip-rgw-chunkingfilter-cleanup
Browse files Browse the repository at this point in the history
rgw: clean up the unneeded rgw::io::ChunkingFilter::has_content_length.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed Mar 24, 2017
2 parents 8fbf6d8 + c52b86d commit bfa315f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/rgw/rgw_client_io_filters.h
Expand Up @@ -210,24 +210,16 @@ template <typename T>
class ChunkingFilter : public DecoratedRestfulClient<T> {
template<typename Td> friend class DecoratedRestfulClient;
protected:
bool has_content_length;
bool chunking_enabled;

public:
template <typename U>
ChunkingFilter(U&& decoratee)
: DecoratedRestfulClient<T>(std::forward<U>(decoratee)),
has_content_length(false),
chunking_enabled(false) {
}

size_t send_content_length(const uint64_t len) override {
has_content_length = true;
return DecoratedRestfulClient<T>::send_content_length(len);
}

size_t send_chunked_transfer_encoding() override {
has_content_length = false;
chunking_enabled = true;
return DecoratedRestfulClient<T>::send_header("Transfer-Encoding",
"chunked");
Expand Down

0 comments on commit bfa315f

Please sign in to comment.