Repository: trafficserver Updated Branches: refs/heads/master fc11d7ef9 -> 55961c89f
TS-2983: Fix protocol probe to not drop data. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/55961c89 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/55961c89 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/55961c89 Branch: refs/heads/master Commit: 55961c89fd99546f41d66e2f83a6c47a978f7603 Parents: fc11d7e Author: Alan M. Carroll <[email protected]> Authored: Fri Aug 22 12:14:18 2014 -0500 Committer: Alan M. Carroll <[email protected]> Committed: Fri Aug 22 12:14:18 2014 -0500 ---------------------------------------------------------------------- CHANGES | 2 ++ proxy/ProtocolProbeSessionAccept.cc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55961c89/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index dae520c..ae0017a 100644 --- a/CHANGES +++ b/CHANGES @@ -10,6 +10,8 @@ Changes with Apache Traffic Server 5.2.0 *) [TS-3031] Race condition in SSLNextProtocolSet::advertiseProtocols + *) [TS-2983] Fix protocol probe to not skip data. + *) [TS-2970] Prevent asserts with transparent pass through. *) [TS-3026] SPDY not forwarding Accept-Encoding for FF http://git-wip-us.apache.org/repos/asf/trafficserver/blob/55961c89/proxy/ProtocolProbeSessionAccept.cc ---------------------------------------------------------------------- diff --git a/proxy/ProtocolProbeSessionAccept.cc b/proxy/ProtocolProbeSessionAccept.cc index dc36653..391604e 100644 --- a/proxy/ProtocolProbeSessionAccept.cc +++ b/proxy/ProtocolProbeSessionAccept.cc @@ -58,19 +58,20 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio { static const size_t minimum_read_size = 1; static const unsigned buffer_size_index = CLIENT_CONNECTION_FIRST_READ_BUFFER_SIZE_INDEX; + IOBufferReader * reader; explicit ProtocolProbeTrampoline(const ProtocolProbeSessionAccept * probe, ProxyMutex * mutex) : Continuation(mutex), probeParent(probe) { this->iobuf = new_MIOBuffer(buffer_size_index); + reader = iobuf->alloc_reader(); // reader must be allocated only on a new MIOBuffer. SET_HANDLER(&ProtocolProbeTrampoline::ioCompletionEvent); } int ioCompletionEvent(int event, void * edata) { VIO * vio; - IOBufferReader * reader; NetVConnection * netvc; ProtoGroupKey key = N_PROTO_GROUPS; // use this as an invalid value. @@ -92,7 +93,6 @@ struct ProtocolProbeTrampoline : public Continuation, public ProtocolProbeSessio return EVENT_ERROR; } - reader = iobuf->alloc_reader(); ink_assert(netvc != NULL); if (!reader->is_read_avail_more_than(minimum_read_size - 1)) {
