Oknet Xu created TS-4455:
----------------------------

             Summary: 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)

Reply via email to