Fix bug URL engine

This commit is contained in:
avogar 2022-02-09 13:53:54 +03:00
parent 437940b29d
commit 7baf23f35f

View File

@ -479,10 +479,11 @@ ColumnsDescription IStorageURLBase::getTableStructureFromData(
} }
else else
{ {
auto parsed_uri = Poco::URI(uri);
StorageURLSource::setCredentials(credentials, parsed_uri);
read_buffer_creator = [&]() read_buffer_creator = [&]()
{ {
auto parsed_uri = Poco::URI(uri);
StorageURLSource::setCredentials(credentials, parsed_uri);
return wrapReadBufferWithCompressionMethod( return wrapReadBufferWithCompressionMethod(
std::make_unique<ReadWriteBufferFromHTTP>( std::make_unique<ReadWriteBufferFromHTTP>(
parsed_uri, parsed_uri,