# HG changeset patch # User Sebastien Jodogne # Date 1547628825 -3600 # Node ID e678a2b1a25be3b78a25d6b7492f66f5ed7901e7 # Parent 8296f0f75716818db663877e0dab5286c23cf14b# Parent b1787ba94eeff01ee2eeb1100d10e8aafad6d34b integration mainline->db-changes diff -r 8296f0f75716 -r e678a2b1a25b LinuxCompilation.txt --- a/LinuxCompilation.txt Tue Jan 15 21:11:44 2019 +0100 +++ b/LinuxCompilation.txt Wed Jan 16 09:53:45 2019 +0100 @@ -85,7 +85,7 @@ libboost-all-dev libwrap0-dev libjsoncpp-dev libpugixml-dev # cmake -DALLOW_DOWNLOADS=ON \ - -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_CIVETWEB=OFF \ -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ -DDCMTK_LIBRARIES=dcmjpls \ -DCMAKE_BUILD_TYPE=Release \ @@ -106,7 +106,7 @@ # cmake "-DDCMTK_LIBRARIES=boost_locale;CharLS;dcmjpls;wrap;oflog" \ -DALLOW_DOWNLOADS=ON \ - -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_CIVETWEB=OFF \ -DUSE_SYSTEM_JSONCPP=OFF \ -DUSE_SYSTEM_PUGIXML=OFF \ -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ @@ -126,7 +126,7 @@ # cmake -DALLOW_DOWNLOADS=ON \ -DUSE_GOOGLE_TEST_DEBIAN_PACKAGE=ON \ - -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_CIVETWEB=OFF \ -DDCMTK_LIBRARIES=dcmjpls \ -DCMAKE_BUILD_TYPE=Release \ ~/Orthanc @@ -146,6 +146,7 @@ # sudo yum install gflags-devel # cmake "-DDCMTK_LIBRARIES=CharLS" \ + -DENABLE_CIVETWEB=OFF \ -DSYSTEM_MONGOOSE_USE_CALLBACKS=OFF \ -DCMAKE_BUILD_TYPE=Release \ ~/Orthanc @@ -162,7 +163,7 @@ e2fsprogs-libuuid boost-libs sqlite3 python libiconv # cmake -DALLOW_DOWNLOADS=ON \ - -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_CIVETWEB=OFF \ -DDCMTK_LIBRARIES="dcmdsig;charls;dcmjpls" \ -DCMAKE_BUILD_TYPE=Release \ ~/Orthanc @@ -178,7 +179,7 @@ # cmake -DALLOW_DOWNLOADS=ON \ -DUSE_SYSTEM_JSONCPP=OFF \ - -DUSE_SYSTEM_MONGOOSE=OFF \ + -DUSE_SYSTEM_CIVETWEB=OFF \ -DUSE_SYSTEM_PUGIXML=OFF \ -DUSE_SYSTEM_SQLITE=OFF \ -DUSE_SYSTEM_BOOST=OFF \ diff -r 8296f0f75716 -r e678a2b1a25b NEWS --- a/NEWS Tue Jan 15 21:11:44 2019 +0100 +++ b/NEWS Wed Jan 16 09:53:45 2019 +0100 @@ -14,15 +14,17 @@ Maintenance ----------- +* CivetWeb is now the default embedded HTTP server (instead of Mongoose) * Don't consider tags whose group is below 0x0008 in C-FIND SCP * Compatibility with DCMTK 3.6.4 * Fix issue #21 (DICOM files missing after uploading with Firefox) +* Fix issue #32 (HTTP keep-alive is now enabled by default) * Fix issue #58 (Patient recycling order should be defined by their received last instance) * Fix issue #118 (Wording in Configuration.json regarding SynchronousCMove) * Fix issue #124 (GET /studies/ID/media fails for certain dicom file) * Fix issue #125 (Mongoose: /instances/{id} returns 500 on invalid HTTP Method) * Fixed Orthanc Explorer on IE and Firefox: Explorer always show "too many results" - and it's therefore impossible to browse the content. + and it's therefore impossible to browse the content * Upgraded dependencies for static and Windows builds: - civetweb 1.11 diff -r 8296f0f75716 -r e678a2b1a25b OrthancServer/main.cpp --- a/OrthancServer/main.cpp Tue Jan 15 21:11:44 2019 +0100 +++ b/OrthancServer/main.cpp Wed Jan 16 09:53:45 2019 +0100 @@ -809,7 +809,7 @@ //httpServer.SetThreadsCount(50); httpServer.SetPortNumber(lock.GetConfiguration().GetUnsignedIntegerParameter("HttpPort", 8042)); httpServer.SetRemoteAccessAllowed(lock.GetConfiguration().GetBooleanParameter("RemoteAccessAllowed", false)); - httpServer.SetKeepAliveEnabled(lock.GetConfiguration().GetBooleanParameter("KeepAlive", false)); + httpServer.SetKeepAliveEnabled(lock.GetConfiguration().GetBooleanParameter("KeepAlive", true)); httpServer.SetHttpCompressionEnabled(lock.GetConfiguration().GetBooleanParameter("HttpCompressionEnabled", true)); httpServer.SetAuthenticationEnabled(lock.GetConfiguration().GetBooleanParameter("AuthenticationEnabled", false)); diff -r 8296f0f75716 -r e678a2b1a25b Resources/CMake/OrthancFrameworkParameters.cmake --- a/Resources/CMake/OrthancFrameworkParameters.cmake Tue Jan 15 21:11:44 2019 +0100 +++ b/Resources/CMake/OrthancFrameworkParameters.cmake Wed Jan 16 09:53:45 2019 +0100 @@ -30,7 +30,7 @@ set(STANDALONE_BUILD ON CACHE BOOL "Standalone build (all the resources are embedded, necessary for releases)") # Generic parameters of the build -set(ENABLE_CIVETWEB OFF CACHE BOOL "Use Civetweb instead of Mongoose (experimental)") +set(ENABLE_CIVETWEB ON CACHE BOOL "Use Civetweb instead of Mongoose (Mongoose was the default embedded HTTP server in Orthanc <= 1.5.1)") set(ENABLE_PKCS11 OFF CACHE BOOL "Enable PKCS#11 for HTTPS client authentication using hardware security modules and smart cards") set(ENABLE_PROFILING OFF CACHE BOOL "Whether to enable the generation of profiling information with gprof") set(ENABLE_SSL ON CACHE BOOL "Include support for SSL") diff -r 8296f0f75716 -r e678a2b1a25b Resources/Configuration.json --- a/Resources/Configuration.json Tue Jan 15 21:11:44 2019 +0100 +++ b/Resources/Configuration.json Wed Jan 16 09:53:45 2019 +0100 @@ -346,9 +346,13 @@ // default behavior since Orthanc 1.4.0). "LogExportedResources" : false, - // Enable or disable HTTP Keep-Alive (deprecated). Set this option - // to "true" only in the case of high HTTP loads. - "KeepAlive" : false, + // Enable or disable HTTP Keep-Alive (persistent HTTP + // connections). Setting this option to "true" prevents Orthanc + // issue #32 ("HttpServer does not support multiple HTTP requests in + // the same TCP stream"), but can slow down HTTP clients that do not + // support persistent connections. The default behavior used to be + // "false" in Orthanc <= 1.5.1. + "KeepAlive" : true, // If this option is set to "false", Orthanc will run in index-only // mode. The DICOM files will not be stored on the drive. Note that diff -r 8296f0f75716 -r e678a2b1a25b Resources/Testing/Issue32/Java/src/test/java/io/osimis/AppTest.java --- a/Resources/Testing/Issue32/Java/src/test/java/io/osimis/AppTest.java Tue Jan 15 21:11:44 2019 +0100 +++ b/Resources/Testing/Issue32/Java/src/test/java/io/osimis/AppTest.java Wed Jan 16 09:53:45 2019 +0100 @@ -1,6 +1,7 @@ package io.osimis; import java.io.IOException; +import java.util.Base64; import org.apache.http.HttpEntity; import org.apache.http.client.HttpRequestRetryHandler; import org.apache.http.client.methods.CloseableHttpResponse; @@ -33,6 +34,10 @@ HttpRequestBase request = new HttpGet("http://localhost:8042/system"); + // Low-level handling of HTTP basic authentication (for integration tests) + request.addHeader("Authorization", "Basic " + + Base64.getEncoder().encodeToString("alice:orthanctest".getBytes())); + // The following call works //HttpRequestBase request = new HttpGet("https://api.ipify.org?format=json");