Skip to content

Commit

Permalink
Merge pull request #38461 from mantidproject/fix_poco_1_14_httpsclien…
Browse files Browse the repository at this point in the history
…tsession

Switch to HTTPSClientSession constructor available in Poco 1.14
  • Loading branch information
peterfpeterson authored Dec 3, 2024
2 parents 5993c0e + 4ccca35 commit 6d086e8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Framework/API/test/FileFinderTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -477,9 +477,9 @@ class FileFinderTest : public CxxTest::TestSuite {
TS_ASSERT(fileOn3.exists());
TS_ASSERT(fileOn4.exists());
#else
TS_ASSERT_THROWS_ANYTHING(fileOn2.exists());
TS_ASSERT_THROWS_ANYTHING(fileOn3.exists());
TS_ASSERT_THROWS_ANYTHING(fileOn4.exists());
TS_ASSERT(!fileOn2.exists());
TS_ASSERT(!fileOn3.exists());
TS_ASSERT(!fileOn4.exists());
#endif

fileFinder.setCaseSensitive(startingCaseOption);
Expand Down
4 changes: 1 addition & 3 deletions Framework/ICat/src/CatalogDownloadDataFiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,7 @@ std::string CatalogDownloadDataFiles::doDownloadandSavetoLocalDrive(const std::s

// Session takes ownership of socket
Poco::Net::SecureStreamSocket socket{context};
Poco::Net::HTTPSClientSession session{socket};
session.setHost(uri.getHost());
session.setPort(uri.getPort());
Poco::Net::HTTPSClientSession session{socket, uri.getHost(), uri.getPort()};

Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, path, Poco::Net::HTTPMessage::HTTP_1_1);
session.sendRequest(request);
Expand Down
3 changes: 1 addition & 2 deletions buildconfig/CMake/CommonSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ if(BUILD_MANTIDFRAMEWORK OR BUILD_MANTIDQT)
# The new interface is not available in Clang yet so we haven't migrated
add_definitions(-D_SILENCE_CXX20_OLD_SHARED_PTR_ATOMIC_SUPPORT_DEPRECATION_WARNING)

find_package(Poco 1.4.6 REQUIRED)
add_definitions(-DPOCO_ENABLE_CPP11)
find_package(Poco REQUIRED)
find_package(TBB REQUIRED)
find_package(OpenSSL REQUIRED)
endif()
Expand Down
5 changes: 2 additions & 3 deletions conda/recipes/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ occt:
orsopy:
- 1.2.1

# 1.12.2 introduced an unguarded #define NOMINMAX which causes a compiler warning.
# It's resolved on their devel branch but not yet included in a release, as of 1.12.5.
# An API change to HTTPSClientSession was introduced in 1.14.0
poco:
- '1.12.1|>=1.12.6,!=1.14.0'
- '>=1.14'

psutil:
- '>=5.8.0'
Expand Down

0 comments on commit 6d086e8

Please sign in to comment.