[ https://issues.apache.org/jira/browse/HTTPCORE-669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17911011#comment-17911011 ]
Shang Xiang commented on HTTPCORE-669: -------------------------------------- {quote}Pretty much all common HTTP servers usually support shorter `h2c` connect handshake with prior knowledge{quote} Hi [~olegk], I am trying to use HttpCore5 to write a server that can serve both {{HTTP/1.1}} and {{h2c}} with prior knowledge on the same port but it seems not possible? My thought is that the server should be able to establish either a {{h2c}} connection by identifying the presence of the connection preface, or a {{HTTP/1.1}} connection with the absence of the preface. However, looking at {{ServerHttpProtocolNegotiationStarter}}, based on the endpoint version policy, it can only serve one of them not both. Is my observation correct? Could you please shed some light on how to achieve it if it is possible with HttpCore5? Thanks in advance! > I found use H2C ,the capture packet doesn't contain Upgrade header > ------------------------------------------------------------------ > > Key: HTTPCORE-669 > URL: https://issues.apache.org/jira/browse/HTTPCORE-669 > Project: HttpComponents HttpCore > Issue Type: Wish > Components: HttpCore > Affects Versions: 5.0.3 > Reporter: zd > Priority: Minor > Fix For: Future > > Attachments: image-2021-02-25-14-25-40-888.png, > image-2021-02-25-14-27-06-073.png > > > My server is support H2C ,and I use JDK 11 httpclient ,this capture packet > is > !image-2021-02-25-14-25-40-888.png! > when I use HttpClient Core , the capture packet is > !image-2021-02-25-14-27-06-073.png! > it likes use H2C directly. > I found the RFC7540 says like JDK11 httpClient is correctly -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org