[
https://issues.apache.org/jira/browse/HTTPCORE-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627559#comment-17627559
]
Isaac Cruz Ballesteros commented on HTTPCORE-727:
-------------------------------------------------
Yes, it works now, I have only tested HTTP1 version since I'm not using HTTP2
at the moment.
There is another related issue, I always get sentBytesCount = 0 when handling
an upload (PUT method), but I get correct values when handling a download (GET
method)... but in this case I'm not sure if the bug is in my own code so I will
keep testing.
> 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
> Fix For: 5.1.5, 5.2-beta3
>
> 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: [email protected]
For additional commands, e-mail: [email protected]