when using the web.xml and red.jsp and having <tomcat-users xmlns="http://tomcat.apache.org/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" version="1.0"> <role rolename="manager"/> <user username="tomcat" password="tomcat" roles="manager"/> </tomcat-users> in conf/tomcat-users.xml in tomcat you can get the problem with basic authentication: curl --verbose --anyauth -u tomcat:tomcat http://localhost:8000/read.jsp -X POST -T file -H "Content-Type: text/plain"
file needs to be big enough ~8.5M you will get: [jfclere@dhcp-144-173 build]$ curl --verbose --anyauth -u tomcat:tomcat http://localhost:8000/read.jsp -X POST -T toto -H "Content-Type: text/plain" * Trying ::1... * TCP_NODELAY set * Connected to localhost (::1) port 8000 (#0) > POST /read.jsp HTTP/1.1 > Host: localhost:8000 > User-Agent: curl/7.59.0 > Accept: */* > Content-Type: text/plain > Content-Length: 8849904 > Expect: 100-continue > < HTTP/1.1 100 Continue * We are completely uploaded and fine < HTTP/1.1 504 Gateway Timeout < Date: Mon, 23 Jul 2018 20:38:21 GMT < Server: Apache/2.5.1-dev (Unix) OpenSSL/1.1.0h-fips < Content-Length: 247 < Content-Type: text/html; charset=iso-8859-1 < <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>504 Gateway Timeout</title> </head><body> <h1>Gateway Timeout</h1> <p>The gateway did not receive a timely response from the upstream server or application.</p> </body></html> * Connection #0 to host localhost left intact -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1641238 Title: as a reverse proxy, a 100 continue response is sent prematurely when a request contains expects: 100-continue To manage notifications about this bug go to: https://bugs.launchpad.net/apache2/+bug/1641238/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs