So, logging using 5.1.3 looks like this: [INFO] --- exec-maven-plugin:3.1.0:java (default-cli) @ commons-vfs2 --- Sun, 13 Nov 2022 13:41:22 GMT | Serving . on /0:0:0:0:0:0:0:0:51729 Sun, 13 Nov 2022 13:41:38 GMT | Handling [head=GET http://localhost:51729/pom.xml, body=null] in org.apache.hc.core5.http.protocol.HttpCoreContext@14bfd281 Sun, 13 Nov 2022 13:41:38 GMT | 0:0:0:0:0:0:0:1:51729<->0:0:0:0:0:0:0:1:51756 | serving file .\pom.xml Sun, 13 Nov 2022 13:41:38 GMT | Handling [head=GET http://localhost:51729/favicon.ico, body=null] in org.apache.hc.core5.http.protocol.HttpCoreContext@30d1209f Sun, 13 Nov 2022 13:41:38 GMT | File .\favicon.ico not found I hit <CTRL-C> Sun, 13 Nov 2022 13:41:53 GMT | HTTP server shutting down (closeMode=GRACEFUL)... Sun, 13 Nov 2022 13:41:53 GMT | HTTP server shut down.
Logging with 5.2 only has the 1st line "Serving " Gary On 2022/11/13 13:43:04 "Gary D. Gregory" wrote: > I added a logging event at the very start of the handle() method. > > Gary > > On 2022/11/13 13:24:19 "Gary D. Gregory" wrote: > > On 2022/11/13 12:58:41 Oleg Kalnichevski wrote: > > > On Sat, 2022-11-12 at 23:21 +0000, Gary D. Gregory wrote: > > > > Hi All: > > > > > > > > I am trying to bump HC from 5.1.3 to 5.2 in Apache Commons VFS and I > > > > get an odd failure. > > > > > > > > To reproduce: > > > > > > > > git clone https://gitbox.apache.org/repos/asf/commons-vfs.git > > > > cd commons-vfs > > > > > > > > Then, this works: > > > > > > > > mvn clean test-compile exec:java - > > > > Dexec.mainClass=org.apache.commons.vfs2.util.NHttpFileServer - > > > > Dexec.args=". 0" -Dexec.classpathScope=test -e -pl commons-vfs2 - > > > > DNHttpFileServer.debug=true -Dhttpclient5.version=5.1.3 > > > > > > > > A file server on the current folder is now listening on the port > > > > displayed on the console as the 0 arg allocates an ephemeral port. > > > > > > > > Test it with: > > > > > > > > curl http://localhost:<ThePort>/pom.xml > > > > > > > > You see the pom.xml > > > > > > > > Next, this does not work, the only difference is the > > > > httpclient5.version passed on the command line: > > > > > > > > mvn clean test-compile exec:java - > > > > Dexec.mainClass=org.apache.commons.vfs2.util.NHttpFileServer - > > > > Dexec.args=". 0" -Dexec.classpathScope=test -e -pl commons-vfs2 - > > > > DNHttpFileServer.debug=true -Dhttpclient5.version=5.2 > > > > > > > > curl http://localhost:<ThePort>/pom.xml > > > > > > > > Gives you something like: > > > > > > > > curl: (7) Failed to connect to localhost port 65079 after 2257 ms: > > > > Connection refused > > > > > > > > Thoughts? > > > > > > > > Gary > > > > > > > > > > Why there is no logging on the server side? There is not a single bit > > > of information that could help make even the wildest guess as to what > > > the cause of the problem might be. > > > > Hello Oleg and All, > > > > Well, the class org.apache.commons.vfs2.util.NHttpFileServer is a clone of > > https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/test/java/org/apache/hc/core5/http/examples/AsyncFileServerExample.java > > with a touch more logging, and minus the content type parsing. > > > > The logging is done to the console just like AsyncFileServerExample and > > enabled with -DNHttpFileServer.debug=true as the examples below show. > > > > I am happy to add logging but where? The method > > org.apache.commons.vfs2.util.NHttpFileServer.HttpFileHandler.handle(Message<HttpRequest, > > Void>, ResponseTrigger, HttpContext) might not even be invoked and it will > > eith log or throw an exception. > > > > TY > > Gary > > > > > > > > Oleg > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > > > For additional commands, e-mail: dev-h...@hc.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > > For additional commands, e-mail: dev-h...@hc.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > For additional commands, e-mail: dev-h...@hc.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org