On 01/10/2024 06:15, Anurag Sharma wrote:
Dear Tomcat Team,
I hope this message finds you well.
I am currently facing a challenge regarding the use of HTTP/1.1 for specific
API endpoints within a servlet configured for HTTP/2. My browser defaults to
HTTP/2, which complicates the situation as I need to proxy some APIs to a
server that only supports HTTP/1.1.
Is there a workaround available to enforce HTTP/1.1 for these particular
endpoints?
It isn't clear from the above which component needs to talk to which
using what protocol.
Servlets don't care whether the request is received via HTTP/1.1 or HTTP/2.
Tomcat will happily process requests for the same servlet using HTTP/1.1
or HTTP/2 depending on client support.
Outgoing requests from Tomcat to external services are outside of the
control of Tomcat and are entirely an application concern.
Can you be more precise about what the problem is?
Mark
Here is out server.xml config. All request from our app is http2 protocol.
<Connector port="${tomcat.secure.port}"
protocol="org.apache.coyote.http11.Http11NioProtocol"
relaxedPathChars="[\\]^`{|}" relaxedQueryChars="[\\]^`{|}"
address="${tomcat.address}" minSpareThreads="100" maxThreads="200"
SSLEnabled="true"
scheme="https" secure="true" maxSwallowSize="-1"
maxPostSize="-1">
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" readTimeout="50000"
streamReadTimeout ="-1" streamWriteTimeout="-1"
overheadContinuationThreshold="0" overheadDataThreshold="0"
overheadWindowUpdateThreshold="0"/>
<SSLHostConfig protocols="TLSv1.2+TLSv1.3"
ciphers="${tomcat.ciphers}">
<Certificate
certificateKeystoreFile="/var/versa/vnms/data/certs/tomcat_keystore.jks"
certificateKeystorePassword="${keystore.password}"
certificateKeyPassword="${key.password}"
certificateKeystoreType="PKCS12" />
</SSLHostConfig>
</Connector>
Thank you so much for your help.
Thanks and Regards,
Anurag Sharma
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org