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

Oleg Kalnichevski commented on HTTPCLIENT-2397:
-----------------------------------------------

> That's why I would classify this as a bug.

[~winfriedgerlach] No, you would not. This hack existed because the classic 
version of HttpClient had some 20 year old APIs that went all the way back to 
version 2.x and the Holy Roman Empire. The async version never had it to start 
with. 

If you want a proper way of disabling plain HTTP please covert this ticket to a 
change request or I close it as invalid.

Oleg

> Prevent use of plain HTTP in HttpClient 5.4+
> --------------------------------------------
>
>                 Key: HTTPCLIENT-2397
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2397
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>            Reporter: Winfried Gerlach
>            Priority: Major
>
> In all HttpClient versions up and until 5.3.1, it was possible to prevent the 
> use of plaintext HTTP by only registering a HTTPS ConnectionSocketFactory. 
> When trying to access an HTTP resource, this would then lead to an 
> \{{UnsupportedSchemeException}} ("http protocol is not supported"):
> [httpcomponents-client/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/DefaultHttpClientConnectionOperator.java
>  at rel/v5.3.1 ยท 
> apache/httpcomponents-client|https://github.com/apache/httpcomponents-client/blob/rel/v5.3.1/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/DefaultHttpClientConnectionOperator.java#L133]
> For HttpClient 5.4+, this check was dropped. Such behavior could still be 
> achieved, e.g. by using a custom SchemePortResolver, but this is a) 
> unnecessarily complicated and b) doesn't help users migrating from an older 
> version that may not even notice that HTTP connections are now suddenly 
> possible again. That's why I would classify this as a bug.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to