[
https://issues.apache.org/jira/browse/HTTPCORE-727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17627660#comment-17627660
]
ASF subversion and git services commented on HTTPCORE-727:
----------------------------------------------------------
Commit 5fdba9b535d1147a57c445cfd09b98d2367d2762 in httpcomponents-core's branch
refs/heads/5.1.x from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=5fdba9b53 ]
HTTPCORE-727 (follow-up): async HTTP/1.1 protocol handler fails to count bytes
transferred while flushing session buffer when writing out a message head or
suspending session output.
> 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: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org