You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2013/07/29 22:05:58 UTC

[1/5] git commit: TS-2074 Remove proxy.config.http.server_port remnants

Updated Branches:
  refs/heads/master 8390de26b -> d82dc8e4d


TS-2074 Remove proxy.config.http.server_port remnants


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

Branch: refs/heads/master
Commit: f913827a01f2b96deeb81cd13cfd32b3f691be93
Parents: 610df9f
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Jul 26 10:04:43 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 29 21:52:05 2013 +0200

----------------------------------------------------------------------
 proxy/http/HttpConfig.cc   |  2 --
 proxy/http/HttpConfig.h    |  2 --
 proxy/http/HttpTransact.cc | 22 ++++++++--------------
 3 files changed, 8 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f913827a/proxy/http/HttpConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index cf7eedc..55fe3f4 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1170,7 +1170,6 @@ HttpConfig::startup()
   c.proxy_response_via_string_len = -1;
 
   HttpEstablishStaticConfigStringAlloc(c.url_expansions_string, "proxy.config.dns.url_expansions");
-  HttpEstablishStaticConfigLongLong(c.proxy_server_port, "proxy.config.http.server_port");
   HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_in, "proxy.config.http.keep_alive_enabled_in");
   HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_out, "proxy.config.http.keep_alive_enabled_out");
   HttpEstablishStaticConfigByte(c.oride.chunking_enabled, "proxy.config.http.chunking_enabled");
@@ -1443,7 +1442,6 @@ HttpConfig::reconfigure()
   params->url_expansions_string = ats_strdup(m_master.url_expansions_string);
   params->url_expansions = parse_url_expansions(params->url_expansions_string, &params->num_url_expansions);
 
-  params->proxy_server_port = m_master.proxy_server_port;
   params->oride.keep_alive_enabled_in = INT_TO_BOOL(m_master.oride.keep_alive_enabled_in);
   params->oride.keep_alive_enabled_out = INT_TO_BOOL(m_master.oride.keep_alive_enabled_out);
   params->oride.chunking_enabled = INT_TO_BOOL(m_master.oride.chunking_enabled);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f913827a/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index e2f9ddb..659bbe7 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -648,7 +648,6 @@ public:
   ///////////////////////////////////////////////////
   // connection variables. timeouts are in seconds //
   ///////////////////////////////////////////////////
-  MgmtInt proxy_server_port;
   MgmtByte session_auth_cache_keep_alive_enabled;
   MgmtInt origin_server_pipeline;
   MgmtInt user_agent_pipeline;
@@ -907,7 +906,6 @@ HttpConfigParams::HttpConfigParams()
     url_expansions_string(0),
     url_expansions(0),
     num_url_expansions(0),
-    proxy_server_port(0),
     session_auth_cache_keep_alive_enabled(0),
     origin_server_pipeline(0),
     user_agent_pipeline(0),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f913827a/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 43d78f2..f31a8bc 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -6217,20 +6217,14 @@ HttpTransact::is_request_valid(State* s, HTTPHdr* incoming_request)
     // Transparent client side, but client did not provide any HOST information
     // (neither in the URL nor a HOST header).
     if (s->http_config_param->client_transparency_enabled) {
-      build_error_response(
-        s,
-        HTTP_STATUS_BAD_REQUEST,
-        "Host Header Required",
-        "interception#no_host",
-        // This is all one long string
-        "An attempt was made to transparently proxy your request, "
-        "but this attempt failed because your browser did not "
-        "send an HTTP 'Host' header.<p>Please manually configure "
-        "your browser to use 'http://%s:%d' as an HTTP proxy. "
-        "Please refer to your browser's documentation for details. ",
-        s->http_config_param->proxy_hostname,
-        s->http_config_param->proxy_server_port
-      );
+      build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Host Header Required",
+                           "interception#no_host", 
+                           "An attempt was made to transparently proxy your request, "
+                           "but this attempt failed because your browser did not "
+                           "send an HTTP 'Host' header.<p>Please manually configure "
+                           "your browser to use 'http://%s' as an HTTP proxy. "
+                           "Please refer to your browser's documentation for details. ",
+                           s->http_config_param->proxy_hostname);
     } else if (s->http_config_param->reverse_proxy_enabled) {   // host header missing, and transparency off but reverse
       // proxy on
       build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Host Header Required", "request#no_host",


[3/5] git commit: Added TS-2074

Posted by zw...@apache.org.
Added TS-2074


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

Branch: refs/heads/master
Commit: 3ec56914ffcb318d74ed11b655ed551235775ff2
Parents: f913827
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Jul 29 21:53:44 2013 +0200
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 29 21:53:44 2013 +0200

----------------------------------------------------------------------
 CHANGES | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/3ec56914/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index dd8dee5..ffd3a4c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,13 +2,16 @@
 Changes with Apache Traffic Server 3.3.5
 
 
-  *) TS-2073 Set the defaults for request_hdr_max_size and
+  *) [TS-2074] Remove proxy.config.http.server_port and
+   proxy.config.http.server_other_ports remnants.
+
+  *) [TS-2073] Set the defaults for request_hdr_max_size and
    response_hdr_max_size properly.
 
-  *) TS-2071 Remove proxy.config.http.session_auth_cache_keep_alive_enabled
+  *) [TS-2071] Remove proxy.config.http.session_auth_cache_keep_alive_enabled
    remnants.
 
-  *) TS-2072 Remove proxy.config.http.avoid_content_spoofing, and also fix a
+  *) [TS-2072] Remove proxy.config.http.avoid_content_spoofing, and also fix a
     logical bug around the tests of when to mark the request header dirty.
 
   *) [TS-1993] SSL certificate chains are loaded from the wrong directory.


[2/5] git commit: Remove proxy.config.http.server_other_ports

Posted by zw...@apache.org.
Remove proxy.config.http.server_other_ports


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

Branch: refs/heads/master
Commit: 610df9f1756046982d15e60cbe5995d48166b66d
Parents: 8390de2
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Jul 26 09:48:05 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 29 21:52:05 2013 +0200

----------------------------------------------------------------------
 doc/admin/transparent-proxy.en.rst     | 11 ++---
 lib/perl/lib/Apache/TS/AdminClient.pm  |  1 -
 mgmt/RecordsConfig.cc                  |  5 ---
 mgmt/cli/CliCreateCommands.cc          |  6 ---
 mgmt/cli/ConfigCmd.cc                  | 70 -----------------------------
 mgmt/cli/ConfigCmd.h                   | 14 ------
 mgmt/cli/ShowCmd.cc                    | 51 ---------------------
 mgmt/cli/ShowCmd.h                     |  4 --
 mgmt/cli/cli_detailed_command_list.txt | 13 ------
 proxy/http/HttpConfig.cc               |  2 -
 proxy/http/HttpConfig.h                |  5 +--
 11 files changed, 5 insertions(+), 177 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/doc/admin/transparent-proxy.en.rst
----------------------------------------------------------------------
diff --git a/doc/admin/transparent-proxy.en.rst b/doc/admin/transparent-proxy.en.rst
index dcbb977..aa91e38 100644
--- a/doc/admin/transparent-proxy.en.rst
+++ b/doc/admin/transparent-proxy.en.rst
@@ -82,10 +82,9 @@ Standard build procedures should work for transparency support but if
 not consult these `more detailed instructions <build>`_
 
 Transparency is configured per server port not globally. This is done
-via the configuration values ``proxy.config.http.server_port_attr`` and
-``proxy.config.http.server_other_ports``. In addition,
-``proxy.config.reverse_proxy_enabled`` must be enabled if the client
-side is transparent. That should be fixed in a future patch.
+via the configuration values ``proxy.config.http.server_port_attr``.
+In addition, ``proxy.config.reverse_proxy_enabled`` must be enabled if the
+client side is transparent. That should be fixed in a future patch.
 
 In the first case use the attribute character (replacing the default
 'X')
@@ -105,10 +104,6 @@ In the outbound transparent case clients must connect directly to ATS
 either through an explicit proxy mechanism or by advertising the IP
 address of the ATS server via DNS as the origin server address.
 
-For ``.server_other_ports`` use the same characters after the port and
-colon, e.g. if port 8088 is to be configured for client side
-transparency use '``8088:>``\ '.
-
 Some tested scenarios --
 
 -  `Transparent bridging <bridge>`_

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/lib/perl/lib/Apache/TS/AdminClient.pm
----------------------------------------------------------------------
diff --git a/lib/perl/lib/Apache/TS/AdminClient.pm b/lib/perl/lib/Apache/TS/AdminClient.pm
index bf97ea6..e85c7c6 100644
--- a/lib/perl/lib/Apache/TS/AdminClient.pm
+++ b/lib/perl/lib/Apache/TS/AdminClient.pm
@@ -514,7 +514,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
  proxy.config.http.response_via_str
  proxy.config.http.send_http11_requests
  proxy.config.http.server_max_connections
- proxy.config.http.server_other_ports
  proxy.config.http.server_port
  proxy.config.http.server_port_attr
  proxy.config.http.share_server_sessions

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/RecordsConfig.cc
----------------------------------------------------------------------
diff --git a/mgmt/RecordsConfig.cc b/mgmt/RecordsConfig.cc
index 4e3b5d1..39931ad 100644
--- a/mgmt/RecordsConfig.cc
+++ b/mgmt/RecordsConfig.cc
@@ -377,9 +377,6 @@ RecordElement RecordsConfig[] = {
   //       # The main server_port is listed here, other server ports is a
   //       # string of ports, separated by whitespace.
   //       #
-  //       # The port attributes should be set to X(default behavior). For
-  //       # example ...server_other_ports STRING 1234:X 12345:X
-  //       #
   {RECT_CONFIG, "proxy.config.http.enabled", RECD_INT, "1", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.server_ports", RECD_STRING, NULL, RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
@@ -388,8 +385,6 @@ RecordElement RecordsConfig[] = {
   ,
   {RECT_CONFIG, "proxy.config.http.server_port_attr", RECD_STRING, "X", RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
   ,
-  {RECT_CONFIG, "proxy.config.http.server_other_ports", RECD_STRING, NULL, RECU_RESTART_TM, RR_NULL, RECC_NULL, NULL, RECA_NULL}
-  ,
   {RECT_CONFIG, "proxy.config.http.wait_for_cache", RECD_INT, "0", RECU_RESTART_TM, RR_NULL, RECC_INT, "[0-1]", RECA_NULL}
   ,
   {RECT_CONFIG, "proxy.config.http.insert_request_via_str", RECD_INT, "1", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/CliCreateCommands.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/CliCreateCommands.cc b/mgmt/cli/CliCreateCommands.cc
index 3d35a67..5a22207 100644
--- a/mgmt/cli/CliCreateCommands.cc
+++ b/mgmt/cli/CliCreateCommands.cc
@@ -91,9 +91,6 @@ CliCreateCommands()
   createCommand("show:socks", Cmd_ShowSocks, CmdArgs_ShowSocks, CLI_COMMAND_EXTERNAL,
                 "show:socks", "SOCKS configuration");
 
-  createCommand("show:port-tunnels", Cmd_ShowPortTunnels, NULL, CLI_COMMAND_EXTERNAL,
-                "show:port-tunnels", "Port tunnels configuration");
-
   createCommand("show:scheduled-update", Cmd_ShowScheduledUpdate, CmdArgs_ShowScheduledUpdate, CLI_COMMAND_EXTERNAL,
                 "show:scheduled-update", "Scheduled update configuration");
 
@@ -179,9 +176,6 @@ CliCreateCommands()
                 "config:icp multicast <on | off>\n"
                 "config:icp query-timeout <seconds>\n" "config:icp peers <url-config-file>", "Configure ICP");
 
-  createCommand("config:port-tunnels", Cmd_ConfigPortTunnels, CmdArgs_ConfigPortTunnels, CLI_COMMAND_EXTERNAL,
-                "config:port-tunnels server-other-ports <port>", "Configure Port Tunnels");
-
   createCommand("config:scheduled-update", Cmd_ConfigScheduledUpdate, CmdArgs_ConfigScheduledUpdate,
                 CLI_COMMAND_EXTERNAL,
                 "config:scheduled-update status <on | off>\n" "config:scheduled-update retry-count <int>\n"

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ConfigCmd.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/ConfigCmd.cc b/mgmt/cli/ConfigCmd.cc
index bdd4502..a40da20 100644
--- a/mgmt/cli/ConfigCmd.cc
+++ b/mgmt/cli/ConfigCmd.cc
@@ -718,7 +718,6 @@ Cmd_ConfigPorts(ClientData clientData, Tcl_Interp * interp, int argc, const char
       return (ConfigPortsGet(argtable[0].parsed_args));
     } else {                    // set
       switch (argtable->parsed_args) {
-      case CMD_CONFIG_PORTS_HTTP_OTHER:
       case CMD_CONFIG_PORTS_CONNECT:
         return (ConfigPortsSet(argtable[0].parsed_args, argtable[0].data));
         break;
@@ -748,8 +747,6 @@ CmdArgs_ConfigPorts()
 {
   createArgument("http-server", 1, CLI_ARGV_OPTION_INT_VALUE,
                  (char *) NULL, CMD_CONFIG_PORTS_HTTP_SERVER, "Set Ports for http-server", (char *) NULL);
-  createArgument("http-other", 1, CLI_ARGV_OPTION_NAME_VALUE,
-                 (char *) NULL, CMD_CONFIG_PORTS_HTTP_OTHER, "Set Ports for http-other", (char *) NULL);
   createArgument("cluster", 1, CLI_ARGV_OPTION_INT_VALUE,
                  (char *) NULL, CMD_CONFIG_PORTS_CLUSTER, "Set Ports for cluster", (char *) NULL);
   createArgument("cluster-rs", 1, CLI_ARGV_OPTION_INT_VALUE,
@@ -1168,58 +1165,6 @@ CmdArgs_ConfigIcp()
 }
 
 ////////////////////////////////////////////////////////////////
-// Cmd_ConfigPortTunnels
-//
-// This is the callback function for the "config:port-tunnels" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ConfigPortTunnels(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  if (cliCheckIfEnabled("config:port-tunnel") == CLI_ERROR) {
-    return CMD_ERROR;
-  }
-  Cli_Debug("Cmd_ConfigPortTunnles argc %d\n", argc);
-
-  cli_cmdCallbackInfo *cmdCallbackInfo;
-  cli_parsedArgInfo *argtable;
-
-  cmdCallbackInfo = (cli_cmdCallbackInfo *) clientData;
-  argtable = cmdCallbackInfo->parsedArgTable;
-
-  if (argtable->parsed_args != CLI_PARSED_ARGV_END) {
-    switch (argtable->parsed_args) {
-    case CMD_CONFIG_PORT_TUNNELS_SERVER_OTHER_PORTS:
-      int status = Cli_RecordInt_Action((argc == 3),
-                                        "proxy.config.http.server_other_ports",
-                                        argtable->arg_int);
-      Cli_Printf("\n");
-      Cli_Printf("Use config:remap to add rules to the remap.config file as follows:\n");
-      Cli_Printf("map tunnel://<proxy_ip>:<port_num>/tunnel://<dest_server>:<dest_port>\n");
-      Cli_Printf("\n");
-      return status;
-    }
-  }
-  Cli_Error(ERR_COMMAND_SYNTAX, cmdCallbackInfo->command_usage);
-  return CMD_ERROR;
-}
-
-////////////////////////////////////////////////////////////////
 // CmdArgs_ConfigPortTunnles
 //
 // Register "config:PortTunnles" arguments with the Tcl interpreter.
@@ -2438,7 +2383,6 @@ ConfigPortsSet(int arg_ref, void *valuePtr)
 {
 
   switch (arg_ref) {
-  case CMD_CONFIG_PORTS_HTTP_OTHER:
   case CMD_CONFIG_PORTS_CONNECT:
     Cli_Debug("ConfigPortsSet: arg_ref %d value %s\n", arg_ref, (char *) valuePtr);
     break;
@@ -2454,9 +2398,6 @@ ConfigPortsSet(int arg_ref, void *valuePtr)
   case CMD_CONFIG_PORTS_HTTP_SERVER:
     status = Cli_RecordSetInt("proxy.config.http.server_port", *(TSInt *) valuePtr, &action_need);
     break;
-  case CMD_CONFIG_PORTS_HTTP_OTHER:
-    status = Cli_RecordSetString("proxy.config.http.server_other_ports", (TSString) valuePtr, &action_need);
-    break;
   case CMD_CONFIG_PORTS_CLUSTER:
     status = Cli_RecordSetInt("proxy.config.cluster.cluster_port", *(TSInt *) valuePtr, &action_need);
     break;
@@ -2505,17 +2446,6 @@ ConfigPortsGet(int arg_ref)
     }
     Cli_Printf("%d\n", int_val);
     break;
-  case CMD_CONFIG_PORTS_HTTP_OTHER:
-    status = Cli_RecordGetString("proxy.config.http.server_other_ports", &str_val);
-    if (status) {
-      return status;
-    }
-    if (str_val) {
-      Cli_Printf("%s\n", str_val);
-    } else {
-      Cli_Printf("none\n");
-    }
-    break;
   case CMD_CONFIG_PORTS_CLUSTER:
     status = Cli_RecordGetInt("proxy.config.cluster.cluster_port", &int_val);
     if (status) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ConfigCmd.h
----------------------------------------------------------------------
diff --git a/mgmt/cli/ConfigCmd.h b/mgmt/cli/ConfigCmd.h
index 6494f4b..42ed681 100644
--- a/mgmt/cli/ConfigCmd.h
+++ b/mgmt/cli/ConfigCmd.h
@@ -48,7 +48,6 @@ typedef enum
   CMD_CONFIG_RESTART_CLUSTER,
   CMD_CONFIG_PORTS,
   CMD_CONFIG_PORTS_HTTP_SERVER,
-  CMD_CONFIG_PORTS_HTTP_OTHER,
   CMD_CONFIG_PORTS_CLUSTER,
   CMD_CONFIG_PORTS_CLUSTER_RS,
   CMD_CONFIG_PORTS_CLUSTER_MC,
@@ -414,19 +413,6 @@ int Cmd_ConfigPorts(ClientData clientData, Tcl_Interp * interp, int argc, const
 int CmdArgs_ConfigPorts();
 
 ////////////////////////////////////////////////////////////////
-// Cmd_ConfigPortTunnles
-//
-// This is the callback function for the "config:port-tunnels" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int Cmd_ConfigPortTunnels(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
-
-////////////////////////////////////////////////////////////////
 // CmdArgs_ConfigPortTunnles
 //
 // Register "config:PortTunnles" arguments with the Tcl interpreter.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ShowCmd.cc
----------------------------------------------------------------------
diff --git a/mgmt/cli/ShowCmd.cc b/mgmt/cli/ShowCmd.cc
index 3024dd5..0798c43 100644
--- a/mgmt/cli/ShowCmd.cc
+++ b/mgmt/cli/ShowCmd.cc
@@ -701,35 +701,6 @@ CmdArgs_ShowSocks()
 }
 
 ////////////////////////////////////////////////////////////////
-// Cmd_ShowPortTunnels
-//
-// This is the callback function for the "show:port-tunnels" command.
-//
-// Parameters:
-//    clientData -- information about parsed arguments
-//    interp -- the Tcl interpreter
-//    argc -- number of command arguments
-//    argv -- the command arguments
-//
-int
-Cmd_ShowPortTunnels(ClientData /* clientData ATS_UNUSED */, Tcl_Interp * interp, int argc, const char *argv[])
-{
-  /* call to processArgForCommand must appear at the beginning
-   * of each command's callback function
-   */
-  if (processArgForCommand(interp, argc, argv) != CLI_OK) {
-    return CMD_ERROR;
-  }
-
-  if (processHelpCommand(argc, argv) == CLI_OK)
-    return CMD_OK;
-
-  Cli_Debug("Cmd_ShowPortTunnels\n");
-
-  return (ShowPortTunnels());
-}
-
-////////////////////////////////////////////////////////////////
 // Cmd_ShowScheduledUpdate
 //
 // This is the callback function for the "show:scheduled-update" command.
@@ -1216,7 +1187,6 @@ ShowHttp()
   Cli_RecordGetInt("proxy.config.http.anonymize_insert_client_ip", &insert_client_ip);
   Cli_RecordGetInt("proxy.config.http.anonymize_remove_client_ip", &remove_client_ip);
   Cli_RecordGetInt("proxy.config.http.server_port", &http_server);
-  Cli_RecordGetString("proxy.config.http.server_other_ports", &http_other);
 
   Cli_RecordGetString("proxy.config.http.global_user_agent_header", &global_user_agent);
 
@@ -1856,27 +1826,6 @@ ShowSocksRules()
   return status;
 }
 
-// show port-tunnels sub-command
-int
-ShowPortTunnels()
-{
-  TSString str_val = NULL;
-  TSError status = TS_ERR_OKAY;
-
-  status = Cli_RecordGetString("proxy.config.http.server_other_ports", &str_val);
-  if (status) {
-    return status;
-  }
-  Cli_Printf("\n");
-  Cli_Printf("server-other-ports -- %s\n", str_val);
-  Cli_Printf("\n");
-  Cli_Printf("To view the corresponding rule of the remap.config file in the following format\n");
-  Cli_Printf("map tunnel://<proxy_ip>:<port_num>/tunnel://<dest_server>:<dest_port>\n");
-  Cli_Printf("Use show:remap\n");
-  Cli_Printf("\n");
-  return CLI_OK;
-}
-
 // show scheduled-update sub-command
 int
 ShowScheduledUpdate()

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/ShowCmd.h
----------------------------------------------------------------------
diff --git a/mgmt/cli/ShowCmd.h b/mgmt/cli/ShowCmd.h
index cbc7cbf..ab9a8c6 100644
--- a/mgmt/cli/ShowCmd.h
+++ b/mgmt/cli/ShowCmd.h
@@ -116,7 +116,6 @@ int CmdArgs_ShowParents();
 int Cmd_ShowRemap(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
 int Cmd_ShowSocks(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
 int CmdArgs_ShowSocks();
-int Cmd_ShowPortTunnels(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
 int Cmd_ShowScheduledUpdate(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
 int CmdArgs_ShowScheduledUpdate();
 int Cmd_ShowProxyStats(ClientData clientData, Tcl_Interp * interp, int argc, const char *argv[]);
@@ -208,9 +207,6 @@ int ShowSocks();
 // show:socks rules sub-command
 int ShowSocksRules();
 
-// show port-tunnels sub-command
-int ShowPortTunnels();
-
 // show scheduled-update sub-command
 int ShowScheduledUpdate();
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/mgmt/cli/cli_detailed_command_list.txt
----------------------------------------------------------------------
diff --git a/mgmt/cli/cli_detailed_command_list.txt b/mgmt/cli/cli_detailed_command_list.txt
index cbdd113..54b2776 100644
--- a/mgmt/cli/cli_detailed_command_list.txt
+++ b/mgmt/cli/cli_detailed_command_list.txt
@@ -357,7 +357,6 @@ http			HTTP Configuration
     ts> show:http
     HTTP Caching ------------------ on      (proxy.config.http.cache.http)
     HTTP Server Port -------------- 14980   (proxy.config.http.server_port)
-    HTTP Other Ports -------------- NULL    (proxy.config.http.server_other_ports)
 
     Keep-Alive Timeout Inbound ---- 10 s    (proxy.config.http.keep_alive_no_activity_timeout_in)
     Keep-Alive Timeout Outbound --- 10 s    (proxy.config.http.keep_alive_no_activity_timeout_out)
@@ -1398,7 +1397,6 @@ ports			Ports used by Traffic Server
                         ssl | socks-server | icp> <port | ports>
   args:   some variables are single-port while other can be a list of ports
           <http-server>     (proxy.config.http.server_port) single
-          <http-other>      (proxy.config.http.server_other_ports) list
           <cluster>         (proxy.config.cluster_port) single
           <cluster-rs>      (proxy.config.cluster.rsport) single
           <cluster-mc>      (proxy.config.cluster.mcport) single
@@ -1426,17 +1424,6 @@ socks			SOCKS Configuration
   ts# config:socks accept-port 1080 
   ts#
 
-port-tunnels		Port Tunnelling Configuration
-
-  syntax: config:port-tunnels server-other-ports <port>
-  args:   other-ports  (proxy.config.http.server_other_ports)
-
-  ts# config:port-tunnels 
-  ts# NULL
-  ts# config:port-tunnels other-ports 5678
-  ts# 
-
-
 
 
 scheduled-update        Scheduled Update Configuration

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/proxy/http/HttpConfig.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
index 385429b..cf7eedc 100644
--- a/proxy/http/HttpConfig.cc
+++ b/proxy/http/HttpConfig.cc
@@ -1171,7 +1171,6 @@ HttpConfig::startup()
 
   HttpEstablishStaticConfigStringAlloc(c.url_expansions_string, "proxy.config.dns.url_expansions");
   HttpEstablishStaticConfigLongLong(c.proxy_server_port, "proxy.config.http.server_port");
-  HttpEstablishStaticConfigStringAlloc(c.proxy_server_other_ports, "proxy.config.http.server_other_ports");
   HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_in, "proxy.config.http.keep_alive_enabled_in");
   HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_out, "proxy.config.http.keep_alive_enabled_out");
   HttpEstablishStaticConfigByte(c.oride.chunking_enabled, "proxy.config.http.chunking_enabled");
@@ -1445,7 +1444,6 @@ HttpConfig::reconfigure()
   params->url_expansions = parse_url_expansions(params->url_expansions_string, &params->num_url_expansions);
 
   params->proxy_server_port = m_master.proxy_server_port;
-  params->proxy_server_other_ports = ats_strdup(m_master.proxy_server_other_ports);
   params->oride.keep_alive_enabled_in = INT_TO_BOOL(m_master.oride.keep_alive_enabled_in);
   params->oride.keep_alive_enabled_out = INT_TO_BOOL(m_master.oride.keep_alive_enabled_out);
   params->oride.chunking_enabled = INT_TO_BOOL(m_master.oride.chunking_enabled);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/610df9f1/proxy/http/HttpConfig.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
index 83d8773..e2f9ddb 100644
--- a/proxy/http/HttpConfig.h
+++ b/proxy/http/HttpConfig.h
@@ -649,7 +649,7 @@ public:
   // connection variables. timeouts are in seconds //
   ///////////////////////////////////////////////////
   MgmtInt proxy_server_port;
-  char *proxy_server_other_ports;
+  MgmtByte session_auth_cache_keep_alive_enabled;
   MgmtInt origin_server_pipeline;
   MgmtInt user_agent_pipeline;
   MgmtInt transaction_active_timeout_in;
@@ -908,7 +908,7 @@ HttpConfigParams::HttpConfigParams()
     url_expansions(0),
     num_url_expansions(0),
     proxy_server_port(0),
-    proxy_server_other_ports(0),
+    session_auth_cache_keep_alive_enabled(0),
     origin_server_pipeline(0),
     user_agent_pipeline(0),
     transaction_active_timeout_in(0),
@@ -967,7 +967,6 @@ HttpConfigParams::~HttpConfigParams()
   ats_free(proxy_request_via_string);
   ats_free(proxy_response_via_string);
   ats_free(url_expansions_string);
-  ats_free(proxy_server_other_ports);
   ats_free(anonymize_other_header_list);
   ats_free(global_user_agent_header);
   ats_free(oride.proxy_response_server_string);


[5/5] git commit: Added TS-2075

Posted by zw...@apache.org.
Added TS-2075


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

Branch: refs/heads/master
Commit: d82dc8e4d37556a01fb930a3c1e9316c254f7abb
Parents: c913a71
Author: Leif Hedstrom <zw...@apache.org>
Authored: Mon Jul 29 22:05:53 2013 +0200
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 29 22:05:53 2013 +0200

----------------------------------------------------------------------
 CHANGES | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d82dc8e4/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ffd3a4c..ec2736f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
 Changes with Apache Traffic Server 3.3.5
 
 
+  *) [TS-2075] Cleanup around suboptimal checks on redirects.
+
   *) [TS-2074] Remove proxy.config.http.server_port and
    proxy.config.http.server_other_ports remnants.
 


[4/5] git commit: TS-2075 Minor clenaup around checking for redirects being enabled

Posted by zw...@apache.org.
TS-2075 Minor clenaup around checking for redirects being enabled


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

Branch: refs/heads/master
Commit: c913a71ec7a0ddd5eae6d3bdf1bff5d7ff795f93
Parents: 3ec5691
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri Jul 26 10:54:24 2013 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Mon Jul 29 22:03:38 2013 +0200

----------------------------------------------------------------------
 proxy/http/HttpSM.cc | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c913a71e/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 4cfe0d1..51f8a66 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -805,10 +805,8 @@ HttpSM::state_read_client_request_header(int event, void *data)
     }
     //YTS Team, yamsat Plugin
     //Setting enable_redirection according to HttpConfig master
-    if (t_state.method == HTTP_WKSIDX_POST && HttpConfig::m_master.post_copy_size)
-      enable_redirection = HttpConfig::m_master.redirection_enabled;
-
-    if (HttpConfig::m_master.number_of_redirections)
+    if ((HttpConfig::m_master.number_of_redirections > 0) ||
+        (t_state.method == HTTP_WKSIDX_POST && HttpConfig::m_master.post_copy_size))
       enable_redirection = HttpConfig::m_master.redirection_enabled;
 
     call_transact_and_set_next_state(HttpTransact::ModifyRequest);


Re: [1/5] git commit: TS-2074 Remove proxy.config.http.server_port remnants

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> Updated Branches:
>   refs/heads/master 8390de26b -> d82dc8e4d
> 
> 
> TS-2074 Remove proxy.config.http.server_port remnants
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/trafficserver/commit/f913827a
> Tree:
> http://git-wip-us.apache.org/repos/asf/trafficserver/tree/f913827a
> Diff:
> http://git-wip-us.apache.org/repos/asf/trafficserver/diff/f913827a
> 
> Branch: refs/heads/master
> Commit: f913827a01f2b96deeb81cd13cfd32b3f691be93
> Parents: 610df9f
> Author: Leif Hedstrom <zw...@apache.org>
> Authored: Fri Jul 26 10:04:43 2013 -0600
> Committer: Leif Hedstrom <zw...@apache.org>
> Committed: Mon Jul 29 21:52:05 2013 +0200
> 
> ----------------------------------------------------------------------
>  proxy/http/HttpConfig.cc   |  2 --
>  proxy/http/HttpConfig.h    |  2 --
>  proxy/http/HttpTransact.cc | 22 ++++++++--------------
>  3 files changed, 8 insertions(+), 18 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f913827a/proxy/http/HttpConfig.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/http/HttpConfig.cc b/proxy/http/HttpConfig.cc
> index cf7eedc..55fe3f4 100644
> --- a/proxy/http/HttpConfig.cc
> +++ b/proxy/http/HttpConfig.cc
> @@ -1170,7 +1170,6 @@ HttpConfig::startup()
>    c.proxy_response_via_string_len = -1;
>  
>    HttpEstablishStaticConfigStringAlloc(c.url_expansions_string,
>    "proxy.config.dns.url_expansions");
> -  HttpEstablishStaticConfigLongLong(c.proxy_server_port,
> "proxy.config.http.server_port");
>    HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_in,
>    "proxy.config.http.keep_alive_enabled_in");
>    HttpEstablishStaticConfigByte(c.oride.keep_alive_enabled_out,
>    "proxy.config.http.keep_alive_enabled_out");
>    HttpEstablishStaticConfigByte(c.oride.chunking_enabled,
>    "proxy.config.http.chunking_enabled");
> @@ -1443,7 +1442,6 @@ HttpConfig::reconfigure()
>    params->url_expansions_string =
>    ats_strdup(m_master.url_expansions_string);
>    params->url_expansions =
>    parse_url_expansions(params->url_expansions_string,
>    &params->num_url_expansions);
>  
> -  params->proxy_server_port = m_master.proxy_server_port;
>    params->oride.keep_alive_enabled_in =
>    INT_TO_BOOL(m_master.oride.keep_alive_enabled_in);
>    params->oride.keep_alive_enabled_out =
>    INT_TO_BOOL(m_master.oride.keep_alive_enabled_out);
>    params->oride.chunking_enabled =
>    INT_TO_BOOL(m_master.oride.chunking_enabled);
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f913827a/proxy/http/HttpConfig.h
> ----------------------------------------------------------------------
> diff --git a/proxy/http/HttpConfig.h b/proxy/http/HttpConfig.h
> index e2f9ddb..659bbe7 100644
> --- a/proxy/http/HttpConfig.h
> +++ b/proxy/http/HttpConfig.h
> @@ -648,7 +648,6 @@ public:
>    ///////////////////////////////////////////////////
>    // connection variables. timeouts are in seconds //
>    ///////////////////////////////////////////////////
> -  MgmtInt proxy_server_port;
>    MgmtByte session_auth_cache_keep_alive_enabled;
>    MgmtInt origin_server_pipeline;
>    MgmtInt user_agent_pipeline;
> @@ -907,7 +906,6 @@ HttpConfigParams::HttpConfigParams()
>      url_expansions_string(0),
>      url_expansions(0),
>      num_url_expansions(0),
> -    proxy_server_port(0),
>      session_auth_cache_keep_alive_enabled(0),
>      origin_server_pipeline(0),
>      user_agent_pipeline(0),
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/f913827a/proxy/http/HttpTransact.cc
> ----------------------------------------------------------------------
> diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
> index 43d78f2..f31a8bc 100644
> --- a/proxy/http/HttpTransact.cc
> +++ b/proxy/http/HttpTransact.cc
> @@ -6217,20 +6217,14 @@ HttpTransact::is_request_valid(State* s,
> HTTPHdr* incoming_request)
>      // Transparent client side, but client did not provide any HOST
>      information
>      // (neither in the URL nor a HOST header).
>      if (s->http_config_param->client_transparency_enabled) {
> -      build_error_response(
> -        s,
> -        HTTP_STATUS_BAD_REQUEST,
> -        "Host Header Required",
> -        "interception#no_host",
> -        // This is all one long string
> -        "An attempt was made to transparently proxy your request, "
> -        "but this attempt failed because your browser did not "
> -        "send an HTTP 'Host' header.<p>Please manually configure "
> -        "your browser to use 'http://%s:%d' as an HTTP proxy. "
> -        "Please refer to your browser's documentation for details.
> ",
> -        s->http_config_param->proxy_hostname,
> -        s->http_config_param->proxy_server_port
> -      );
> +      build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Host Header
> Required",
> +                           "interception#no_host",
> +                           "An attempt was made to transparently
> proxy your request, "
> +                           "but this attempt failed because your
> browser did not "
> +                           "send an HTTP 'Host' header.<p>Please
> manually configure "
> +                           "your browser to use 'http://%s' as an
> HTTP proxy. "
> +                           "Please refer to your browser's
> documentation for details. ",
> +                           s->http_config_param->proxy_hostname);
>      } else if (s->http_config_param->reverse_proxy_enabled) {   //

my old eyes are a bit weary, are you mixing style and code changes
in the same commit here?

>      host header missing, and transparency off but reverse
>        // proxy on
>        build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Host Header
>        Required", "request#no_host",
> 
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE