You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/18 12:09:12 UTC
[jira] [Commented] (TS-4455) remove isEosRcvd() and eosRcvd
[ https://issues.apache.org/jira/browse/TS-4455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288859#comment-15288859 ]
ASF GitHub Bot commented on TS-4455:
------------------------------------
GitHub user oknet opened a pull request:
https://github.com/apache/trafficserver/pull/646
TS-4455: remove isEosRcvd() and eosRcvd
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/oknet/trafficserver patch-12
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/646.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #646
----
commit 87d8d3864d4b0a5a567778cece17e1aab648075a
Author: Oknet <xu...@gmail.com>
Date: 2016-05-18T11:48:34Z
remove call to isEosRcvd()
commit 8b52939a9479ea71ffcedd33c7bf579ae13388e6
Author: Oknet <xu...@gmail.com>
Date: 2016-05-18T11:52:39Z
remove eosRcvd
commit 43e894aa7520f6754a60f4d11f8bba3b2b14b205
Author: Oknet <xu...@gmail.com>
Date: 2016-05-18T11:53:53Z
remove eosRcvd and isEosRcvd()
----
> remove isEosRcvd() and eosRcvd
> ------------------------------
>
> Key: TS-4455
> URL: https://issues.apache.org/jira/browse/TS-4455
> Project: Traffic Server
> Issue Type: Bug
> Components: SSL
> Reporter: Oknet Xu
>
> the isEosRcvd() is used by HttpSM.
> It is check SSLNetVConnection->eosRcvd while received VC_EVENT_READ_READY or VC_EVENT_READ_COMPLETE event, and rewrite the event to VC_EVENT_EOS.
> {code}
> int
> HttpSM::state_read_client_request_header(int event, void *data)
> {
> .
> .
> .
> // check to see if there was an EOS received on the SSL connection
> SSLNetVConnection *ssl_vc = dynamic_cast<SSLNetVConnection *>(ua_session->get_netvc());
> if (ssl_vc && ssl_vc->isEosRcvd()) {
> DebugSM("http", "EOS for ssl vc %p at read_first_btye state", ua_session->get_netvc());
> event = VC_EVENT_EOS;
> }
> switch (event) {
> case VC_EVENT_READ_READY:
> case VC_EVENT_READ_COMPLETE:
> // More data to parse
> break;
> case VC_EVENT_EOS:
> ua_entry->eos = true;
> if ((client_request_hdr_bytes > 0) && is_transparent_passthrough_allowed() && (ua_raw_buffer_reader != NULL)) {
> break;
> }
> .
> .
> .
> {code}
> the eosRcvd is set to true only in SSLNetVConnection::net_read_io()
> {code}
> // changed by YTS Team, yamsat
> void
> SSLNetVConnection::net_read_io(NetHandler *nh, EThread *lthread)
> {
> .
> .
> .
> case SSL_READ_EOS:
> // close the connection if we have SSL_READ_EOS, this is the return value from ssl_read_from_net() if we get an
> // SSL_ERROR_ZERO_RETURN from SSL_get_error()
> // SSL_ERROR_ZERO_RETURN means that the origin server closed the SSL connection
> eosRcvd = true;
> read.triggered = 0;
> readSignalDone(VC_EVENT_EOS, nh);
> if (bytes > 0) {
> Debug("ssl", "read_from_net, read finished - EOS");
> } else {
> Debug("ssl", "read_from_net, read finished - 0 useful bytes read, bytes used by SSL layer");
> }
> break;
> .
> .
> .
> {code}
> It is also signal VC_EVENT_EOS to SM after set eosRcvd to true.
> thus, the eosRcvd and isEosRcvd() is no longer necessary.
> suggest remove them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)