@@ -48,9 +48,9 @@ static Poco::URI getUriAfterRedirect(const Poco::URI & prev_uri, Poco::Net::HTTP
4848
4949template <typename TSessionFactory>
5050UpdatableSession<TSessionFactory>::UpdatableSession(const Poco::URI & uri, UInt64 max_redirects_, std::shared_ptr<TSessionFactory> session_factory_)
51- : max_redirects{max_redirects_}
51+ : session_factory(std::move(session_factory_))
52+ , max_redirects{max_redirects_}
5253 , initial_uri(uri)
53- , session_factory(std::move(session_factory_))
5454{
5555 session = session_factory->buildNewSession (uri);
5656}
@@ -108,7 +108,7 @@ void ReadWriteBufferFromHTTPBase<UpdatableSessionPtr>::prepareRequest(Poco::Net:
108108 else if (method == Poco::Net::HTTPRequest::HTTP_POST)
109109 request.setContentLength (0 ); // / No callback - no body
110110
111- for (auto & [header, value] : http_header_entries)
111+ for (const auto & [header, value] : http_header_entries)
112112 request.set (header, value);
113113
114114 if (range)
@@ -635,7 +635,7 @@ size_t ReadWriteBufferFromHTTPBase<UpdatableSessionPtr>::readBigAt(char * to, si
635635 if (e.code () == POCO_EMFILE)
636636 throw ;
637637
638- if (auto h = dynamic_cast <const HTTPException*>(&e);
638+ if (const auto h = dynamic_cast <const HTTPException*>(&e);
639639 h && !isRetriableError (static_cast <Poco::Net::HTTPResponse::HTTPStatus>(h->getHTTPStatus ())))
640640 throw ;
641641
0 commit comments