[ 
https://issues.apache.org/jira/browse/HTTPCORE-669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17911048#comment-17911048
 ] 

Oleg Kalnichevski commented on HTTPCORE-669:
--------------------------------------------

[~cooltomatos] It should certainly be possible. Take a look at 
`ServerH2PrefaceHandler`. At present it fails with ProtocolNegotiationException 
if it does not receive a valid H2 preface. What you could do is to create a 
custom protocol negotiator falls back onto HTTP/1.1 protocol instead of failing 
the protocol negotiation.

https://github.com/apache/httpcomponents-core/blob/master/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/ServerH2PrefaceHandler.java#L90

Oleg

> 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

Reply via email to