fixing details in code style and moving tests

This commit is contained in:
FArthur-cmd 2021-05-08 12:46:50 +03:00
parent 9728dce349
commit acb09f01d4
5 changed files with 12 additions and 14 deletions

View File

@ -179,7 +179,14 @@ BlockInputStreamPtr HTTPDictionarySource::loadKeys(const Columns & key_columns,
Poco::URI uri(url);
auto in_ptr = std::make_unique<ReadWriteBufferFromHTTP>(
uri, Poco::Net::HTTPRequest::HTTP_POST, out_stream_callback, timeouts, 0, credentials, DBMS_DEFAULT_BUFFER_SIZE, header_entries);
uri,
Poco::Net::HTTPRequest::HTTP_POST,
out_stream_callback,
timeouts,
0,
credentials,
DBMS_DEFAULT_BUFFER_SIZE,
header_entries);
return createWrappedBuffer(std::move(in_ptr));
}

View File

@ -91,8 +91,7 @@ namespace detail
protected:
Poco::URI uri;
std::string method;
std::string compress_method;
std::string method, content_encoding;
UpdatableSessionPtr session;
std::istream * istr; /// owned by session
@ -138,7 +137,7 @@ namespace detail
istr = receiveResponse(*sess, request, response, true);
response.getCookies(cookies);
compress_method = response.get("Content-Encoding");
content_encoding = response.get("Content-Encoding");
return istr;
}
@ -167,7 +166,6 @@ namespace detail
: ReadBuffer(nullptr, 0)
, uri {uri_}
, method {!method_.empty() ? method_ : out_stream_callback_ ? Poco::Net::HTTPRequest::HTTP_POST : Poco::Net::HTTPRequest::HTTP_GET}
, compress_method{}
, session {session_}
, out_stream_callback {out_stream_callback_}
, credentials {credentials_}
@ -234,9 +232,9 @@ namespace detail
next_callback(count());
}
std::string getCompressMethod() const
const std::string& getCompressMethod() const
{
return compress_method;
return content_encoding;
}
};
}

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
python3 "$CURDIR"/01854_HTTP_dict_decompression.python