Skip to content

Commit

Permalink
Merge remote-tracking branch 'asf/8.1.x' into 8.1.x
Browse files Browse the repository at this point in the history
* asf/8.1.x:
  Updated ChangeLog
  Do not cache Transfer-Encoding header (apache#7234)
  slice: check if vio is still valid before calling TSVIODone* on shutdown (apache#7147)
  slice: fix throttle not work (apache#7008) (apache#7195)
  • Loading branch information
zwoop committed Oct 6, 2020
2 parents dc4eb2c + 24bca03 commit 6be11b3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG-8.1.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changes with Apache Traffic Server 8.1.1
#7147 - slice: check if vio is still valid before calling TSVIODone* on shutdown
#7154 - Fixes H2 toggling using ssl_server_name.yaml
#7156 - Fixes garbled logs when using %<vbn> log tag
#7191 - Emits log when OCSP fails to connect to server
#7195 - slice: fix throttle not work (#7008)
#7217 - Remove usage of stored ACL record, fix ipallow reload
#7234 - Do not cache Transfer-Encoding header
4 changes: 3 additions & 1 deletion plugins/experimental/slice/Stage.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ struct Channel {
int64_t const avail = TSIOBufferReaderAvail(m_reader);
TSIOBufferReaderConsume(m_reader, avail);
consumed = avail;
TSVIONDoneSet(m_vio, TSVIONDoneGet(m_vio) + consumed);
if (nullptr != m_vio) {
TSVIONDoneSet(m_vio, TSVIONDoneGet(m_vio) + consumed);
}
}

return consumed;
Expand Down
4 changes: 2 additions & 2 deletions plugins/experimental/slice/client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ handle_client_resp(TSCont contp, TSEvent event, Data *const data)
int64_t const output_sent = data->m_bytessent;
int64_t const threshout = data->m_config->m_blockbytes;

if (threshout < (output_done - output_sent)) {
if (threshout < (output_sent - output_done)) {
start_next_block = false;
DEBUG_LOG("%p handle_client_resp: throttling %" PRId64, data, (output_done - output_sent));
DEBUG_LOG("%p handle_client_resp: throttling %" PRId64, data, (output_sent - output_done));
}
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/experimental/slice/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ handle_server_resp(TSCont contp, TSEvent event, Data *const data)
int64_t const output_sent = data->m_bytessent;
int64_t const threshout = data->m_config->m_blockbytes;

if (threshout < (output_done - output_sent)) {
if (threshout < (output_sent - output_done)) {
start_next_block = false;
DEBUG_LOG("%p handle_server_resp: throttling %" PRId64, data, (output_done - output_sent));
DEBUG_LOG("%p handle_server_resp: throttling %" PRId64, data, (output_sent - output_done));
}
}

Expand Down
4 changes: 2 additions & 2 deletions proxy/http/HttpTransact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4762,9 +4762,9 @@ HttpTransact::merge_response_header_with_cached_header(HTTPHdr *cached_header, H
continue;
}
/////////////////////////////////////
// dont cache content-length field //
// dont cache content-length field and transfer encoding //
/////////////////////////////////////
if (name == MIME_FIELD_CONTENT_LENGTH) {
if (name == MIME_FIELD_CONTENT_LENGTH || name == MIME_FIELD_TRANSFER_ENCODING) {
continue;
}
/////////////////////////////////////
Expand Down

0 comments on commit 6be11b3

Please sign in to comment.