You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2016/03/02 00:26:51 UTC

[1/2] trafficserver git commit: TS-4243: Added collapsed_forward to the parent makefile so it will get built. Also changed the allocation of the RequestData so the std::string member is appropriately initialized. This was causing a crash when running.

Repository: trafficserver
Updated Branches:
  refs/heads/ts-4243 [created] 3bed6ec1c


TS-4243:  Added collapsed_forward to the parent makefile so it will get built.
Also changed the allocation of the RequestData so the std::string member is appropriately initialized. This was
causing a crash when running.  And fixed a compile error I saw in RHEL 6


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5adbb838
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5adbb838
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5adbb838

Branch: refs/heads/ts-4243
Commit: 5adbb83843baa84373572a732b6d69dd03ca8e4f
Parents: 0861ec4
Author: shinrich <sh...@yahoo-inc.com>
Authored: Tue Mar 1 16:35:38 2016 -0600
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Tue Mar 1 16:35:38 2016 -0600

----------------------------------------------------------------------
 plugins/experimental/Makefile.am                        |  1 +
 .../collapsed_forwarding/collapsed_forwarding.cc        | 12 +++++-------
 2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5adbb838/plugins/experimental/Makefile.am
----------------------------------------------------------------------
diff --git a/plugins/experimental/Makefile.am b/plugins/experimental/Makefile.am
index c6bf978..1a98e39 100644
--- a/plugins/experimental/Makefile.am
+++ b/plugins/experimental/Makefile.am
@@ -23,6 +23,7 @@ SUBDIRS = \
  cache_range_requests \
  cache_promote \
  collapsed_connection \
+ collapsed_forwarding \
  custom_redirect \
  epic \
  escalate \

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5adbb838/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc b/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
index 52f3077..bfc626a 100644
--- a/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
+++ b/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
@@ -216,7 +216,7 @@ on_send_response_header(RequestData *req, TSHttpTxn &txnp, TSCont &contp)
   }
 
   // done..cleanup
-  TSfree(req);
+  delete req;
   TSContDestroy(contp);
 
   TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
@@ -242,8 +242,8 @@ collapsed_cont(TSCont contp, TSEvent event, void *edata)
   case TS_EVENT_HTTP_READ_RESPONSE_HDR: {
     return on_read_response_header(txnp);
   }
-  case TSEvent::TS_EVENT_IMMEDIATE:
-  case TSEvent::TS_EVENT_TIMEOUT: {
+  case TS_EVENT_IMMEDIATE:
+  case TS_EVENT_TIMEOUT: {
     return on_immediate(my_req, contp);
   }
   case TS_EVENT_HTTP_SEND_RESPONSE_HDR: {
@@ -286,16 +286,14 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
 {
   TSCont cont = TSContCreate(collapsed_cont, TSMutexCreate());
 
-  RequestData *req_data;
-  req_data = static_cast<RequestData *>(TSmalloc(sizeof(RequestData)));
-  memset(req_data, 0, sizeof(RequestData));
+  RequestData *req_data = new RequestData();
 
   req_data->txnp = rh;
   req_data->wl_retry = 0;
 
   int url_len = 0;
   char *url = TSHttpTxnEffectiveUrlStringGet(rh, &url_len);
-  req_data->req_url = std::string(url, url_len);
+  req_data->req_url.assign(url, url_len);
 
   TSfree(url);
   TSContDataSet(cont, req_data);


[2/2] trafficserver git commit: TS-4243: Add a check for the 500 created from aborting in the DNS lookup. Try that again.

Posted by sh...@apache.org.
TS-4243: Add a check for the 500 created from aborting in the DNS lookup.  Try that again.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/3bed6ec1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/3bed6ec1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/3bed6ec1

Branch: refs/heads/ts-4243
Commit: 3bed6ec1ccc710bd174b2f9b386407616531da23
Parents: 5adbb83
Author: shinrich <sh...@yahoo-inc.com>
Authored: Tue Mar 1 17:26:15 2016 -0600
Committer: shinrich <sh...@yahoo-inc.com>
Committed: Tue Mar 1 17:26:15 2016 -0600

----------------------------------------------------------------------
 plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3bed6ec1/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc b/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
index bfc626a..2eed7b5 100644
--- a/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
+++ b/plugins/experimental/collapsed_forwarding/collapsed_forwarding.cc
@@ -195,7 +195,7 @@ on_send_response_header(RequestData *req, TSHttpTxn &txnp, TSCont &contp)
   TSHttpStatus status = TSHttpHdrStatusGet(bufp, hdr_loc);
   TSDebug(DEBUG_TAG, "Response code: %d", status);
 
-  if ((status == TS_HTTP_STATUS_BAD_GATEWAY) || (status == TS_HTTP_STATUS_SEE_OTHER)) {
+  if ((status == TS_HTTP_STATUS_BAD_GATEWAY) || (status == TS_HTTP_STATUS_SEE_OTHER) || status == TS_HTTP_STATUS_INTERNAL_SERVER_ERROR) {
     bool is_internal_message_hdr = check_internal_message_hdr(txnp);
     bool delay_request =
       is_internal_message_hdr || ((req->wl_retry > 0) && (req->wl_retry < OPEN_WRITE_FAIL_MAX_REQ_DELAY_RETRIES));