You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/10/31 20:21:00 UTC

[jira] [Commented] (HTTPCORE-727) EndpointDetails.getReceivedBytesCount() won't work under TLS

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

ASF subversion and git services commented on HTTPCORE-727:
----------------------------------------------------------

Commit 3bc973a9ea822f6cf433982ded5894f760e74541 in httpcomponents-core's branch refs/heads/HTTPCORE-727 from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=3bc973a9e ]

HTTPCORE-727: Protocol handlers fail to update input metrics when receive input data from a TLS encrypted I/O session


> EndpointDetails.getReceivedBytesCount() won't work under TLS
> ------------------------------------------------------------
>
>                 Key: HTTPCORE-727
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-727
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore NIO
>    Affects Versions: 5.1.4
>            Reporter: Isaac Cruz Ballesteros
>            Priority: Minor
>         Attachments: AsyncFileServerExample.java
>
>
> When using TLS, endpointDetails.getReceivedBytesCount(), called on disconnection(), always returns 0. I have modified AsyncFileServerExample (attached) to enable TLS and get EndpointDetails to get that metric to reproduce this issue.
> After executing AsyncFileServerExample, I run
> {noformat}
> wget --no-check-certificate https://localhost:8080/xxx{noformat}
> (it will get a 404), and the output is:
> {noformat}
> Sun, 30 Oct 2022 14:34:07 GMT | Listening on /[0:0:0:0:0:0:0:0]:8080
> Sun, 30 Oct 2022 14:34:11 GMT | handle() EndpointDetails: sent=0, received=0
> Sun, 30 Oct 2022 14:34:11 GMT | File .\xxx not found
> Sun, 30 Oct 2022 14:34:11 GMT | disconnected() EndpointDetails: sent=252, received=0 {noformat}
> Notice how sent bytes is updated after handle(), but received is always 0.
> This is the output when switching to HTTP:
> {noformat}
> Mon, 31 Oct 2022 08:09:29 GMT | Listening on /[0:0:0:0:0:0:0:0]:8080
> Mon, 31 Oct 2022 08:09:46 GMT | handle() EndpointDetails: sent=0, received=114
> Mon, 31 Oct 2022 08:09:46 GMT | File .\xxx not found
> Mon, 31 Oct 2022 08:09:46 GMT | disconnected() EndpointDetails: sent=252, received=114{noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org