trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jplev...@apache.org
Subject svn commit: r906288 - in /incubator/trafficserver/traffic/branches/dev: ./ configure.ac iocore/aio/AIO.cc iocore/aio/inkaio.c iocore/aio/inkaio.h proxy/RemapAPI.h proxy/TS_version proxy/http2/remap/RemapPlugins.cc proxy/http2/remap/UrlRewrite.cc
Date Wed, 03 Feb 2010 23:36:59 GMT
Author: jplevyak
Date: Wed Feb  3 23:36:58 2010
New Revision: 906288

URL: http://svn.apache.org/viewvc?rev=906288&view=rev
Log:
merge trunk changes

Removed:
    incubator/trafficserver/traffic/branches/dev/iocore/aio/inkaio.c
    incubator/trafficserver/traffic/branches/dev/iocore/aio/inkaio.h
Modified:
    incubator/trafficserver/traffic/branches/dev/   (props changed)
    incubator/trafficserver/traffic/branches/dev/configure.ac
    incubator/trafficserver/traffic/branches/dev/iocore/aio/AIO.cc
    incubator/trafficserver/traffic/branches/dev/proxy/RemapAPI.h
    incubator/trafficserver/traffic/branches/dev/proxy/TS_version
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/RemapPlugins.cc
    incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc

Propchange: incubator/trafficserver/traffic/branches/dev/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb  3 23:36:58 2010
@@ -1 +1 @@
-/incubator/trafficserver/traffic/trunk:891822-906162
+/incubator/trafficserver/traffic/trunk:891822-906286

Modified: incubator/trafficserver/traffic/branches/dev/configure.ac
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/configure.ac?rev=906288&r1=906287&r2=906288&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/configure.ac (original)
+++ incubator/trafficserver/traffic/branches/dev/configure.ac Wed Feb  3 23:36:58 2010
@@ -61,7 +61,7 @@
   [
   with_user="$withval"
   ],[
-  with_user="$build_person"
+  with_user="nobody"
   ]
 )
 
@@ -70,7 +70,7 @@
   [
   with_group="$withval"
   ],[
-  with_group="$build_group"
+  with_group="nobody"
   ]
 )
 AC_SUBST([pkgsysuser],[$with_user])
@@ -125,21 +125,6 @@
 )
 
 #
-# Disk InkAIO
-#
-
-AC_MSG_CHECKING([whether to enable disk InkAIO])
-AC_ARG_ENABLE([diskinkaio],
-  [AS_HELP_STRING([--enable-diskinkaio],[enable disk InkAIO])],
-  [],
-  [enable_diskinkaio=no]
-)
-AC_MSG_RESULT([$enable_diskinkaio])
-AS_IF([test "x$enable_diskinkaio" = "xyes"],
-  [AC_DEFINE([INKDISKAIO])]
-)
-
-#
 # libev
 #
 

Modified: incubator/trafficserver/traffic/branches/dev/iocore/aio/AIO.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/iocore/aio/AIO.cc?rev=906288&r1=906287&r2=906288&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/iocore/aio/AIO.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/iocore/aio/AIO.cc Wed Feb  3 23:36:58 2010
@@ -40,8 +40,8 @@
 // acquire this mutex before inserting a new entry in the aio_reqs array.
 // Don't need to acquire this for searching the array
 static ink_mutex insert_mutex;
-RecInt cache_config_threads_per_disk = 12;
 Continuation *aio_err_callbck = 0;
+RecInt cache_config_threads_per_disk = 12;
 
 // AIO Stats
 inku64 aio_num_read = 0;
@@ -151,13 +151,10 @@
   RecRegisterRawStat(aio_rsb, RECT_PROCESS,
                      "proxy.process.cache.KB_write_per_sec",
                      RECD_FLOAT, RECP_NULL, (int) AIO_STAT_KB_WRITE_PER_SEC, aio_stats_cb);
-
-  if (!ts_config_with_inkdiskio) {
-    memset(&aio_reqs, 0, MAX_DISKS_POSSIBLE * sizeof(AIO_Reqs *));
-    ink_mutex_init(&insert_mutex, NULL);
-    IOCORE_RegisterConfigInteger(RECT_CONFIG, "proxy.config.cache.threads_per_disk", 4, RECU_NULL,
RECC_NULL, NULL);
-    IOCORE_ReadConfigInteger(cache_config_threads_per_disk, "proxy.config.cache.threads_per_disk");
-  }
+  memset(&aio_reqs, 0, MAX_DISKS_POSSIBLE * sizeof(AIO_Reqs *));
+  ink_mutex_init(&insert_mutex, NULL);
+  IOCORE_RegisterConfigInteger(RECT_CONFIG, "proxy.config.cache.threads_per_disk", 4, RECU_NULL,
RECC_NULL, NULL);
+  IOCORE_ReadConfigInteger(cache_config_threads_per_disk, "proxy.config.cache.threads_per_disk");
 }
 
 int
@@ -225,16 +222,14 @@
 
   aio_reqs[num_filedes] = request;
 
-  if (!ts_config_with_inkdiskio) {
-    /* create the main thread */
-    AIOThreadInfo *thr_info;
-    for (i = 0; i < cache_config_threads_per_disk; i++) {
-      if (i == (cache_config_threads_per_disk - 1))
-        thr_info = new AIOThreadInfo(request, 1);
-      else
-        thr_info = new AIOThreadInfo(request, 0);
-      ink_assert(eventProcessor.spawn_thread(thr_info));
-    }
+  /* create the main thread */
+  AIOThreadInfo *thr_info;
+  for (i = 0; i < cache_config_threads_per_disk; i++) {
+    if (i == (cache_config_threads_per_disk - 1))
+      thr_info = new AIOThreadInfo(request, 1);
+    else
+      thr_info = new AIOThreadInfo(request, 0);
+    ink_assert(eventProcessor.spawn_thread(thr_info));
   }
 
   /* the num_filedes should be incremented after initializing everything.

Modified: incubator/trafficserver/traffic/branches/dev/proxy/RemapAPI.h
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/RemapAPI.h?rev=906288&r1=906287&r2=906288&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/RemapAPI.h (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/RemapAPI.h Wed Feb  3 23:36:58 2010
@@ -120,6 +120,9 @@
     const char *request_query;  /* request query string */
     int request_query_size;     /* request query string size. A negative size means remove
it completely. */
 
+    const char *request_matrix; /* request matrix string */
+    int request_matrix_size;    /* request matrix string size. A negative size means remove
it completely. */
+
     const char *from_scheme;    /* The "from" scheme (e.g. HTTP) */
     int from_scheme_len;        /* The len of the "from" scheme */
 
@@ -138,6 +141,8 @@
     int new_path_size;          /* new path string size (0 - do not change request path)
*/
     char new_query[TSREMAP_RRI_MAX_PATH_SIZE];  /* new query string */
     int new_query_size;         /* new query string size (0 - do not change request query)
*/
+    char new_matrix[TSREMAP_RRI_MAX_PATH_SIZE]; /* new matrix parameter string */
+    int new_matrix_size;        /* new matrix parameter string size (0 - do not change matrix
parameters) */
     char redirect_url[TSREMAP_RRI_MAX_REDIRECT_URL];    /* redirect url (to redirect/reject
request) */
     int redirect_url_size;      /* redirect url size (0 - empty redirect url string) */
     int require_ssl;            /* Require the toScheme to become SSL (e.g. HTTPS).  */

Modified: incubator/trafficserver/traffic/branches/dev/proxy/TS_version
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/TS_version?rev=906288&r1=906287&r2=906288&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/TS_version (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/TS_version Wed Feb  3 23:36:58 2010
@@ -1 +1 @@
-<TS_VERSION> 5.5.0
+<TS_VERSION> 2.0.0a

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/RemapPlugins.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/RemapPlugins.cc?rev=906288&r1=906287&r2=906288&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/RemapPlugins.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/RemapPlugins.cc Wed Feb
 3 23:36:58 2010
@@ -123,6 +123,9 @@
   // Get request query
   rri.request_query = _request_url->query_get(&rri.request_query_size);
 
+  // Get request matrix parameters
+  rri.request_matrix = _request_url->params_get(&rri.request_matrix_size);
+
   // Get toURL host
   rri.remap_to_host = toHost;
   rri.remap_to_host_size = toHostLen;
@@ -142,7 +145,12 @@
   rri.require_ssl = -1;         // By default, the plugin will not modify the to_scheme
 
   // Used to see if plugin changed anything.
-  rri.new_port = (rri.new_host_size = (rri.new_path_size = (rri.redirect_url_size = (rri.new_query_size
= 0))));
+  rri.new_port = 0;
+  rri.new_host_size = 0;
+  rri.new_path_size = 0;
+  rri.redirect_url_size = 0;
+  rri.new_query_size = 0;
+  rri.new_matrix_size = 0;
 
   // Get request Host
   rri.request_host = _request_url->host_get(&rri.request_host_size);
@@ -200,7 +208,7 @@
         _request_url->path_set(rri.new_path, rri.new_path_size);
       *plugin_modified_path = true;
     }
-    // Finally, update the query string. This has a special case, where a negative
+    // Update the query string. This has a special case, where a negative
     // size value means to remove the query string entirely.
     if (rri.new_query_size != 0) {
       if (rri.new_query_size < 0)
@@ -208,6 +216,14 @@
       else
         _request_url->query_set(rri.new_query, rri.new_query_size);
     }
+    // Update the matrix parameter string. This has a special case, where a negative
+    // size value means to remove the matrix parameter string entirely.
+    if (rri.new_matrix_size != 0) {
+      if (rri.new_matrix_size < 0)
+        _request_url->params_set(NULL, 0);
+      else
+        _request_url->params_set(rri.new_matrix, rri.new_matrix_size);
+    }
     // If require_ssl is set, make sure our toScheme is SSL'ified. It's done this way
     // to avoid dealing with weirness (say, a plugin trying to modify the "toScheme"
     // from FTP to HTTPS).

Modified: incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc?rev=906288&r1=906287&r2=906288&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/http2/remap/UrlRewrite.cc Wed Feb 
3 23:36:58 2010
@@ -881,162 +881,6 @@
   if (plugin || debug_on)
     request_url->string_get_buf(origURLBuf, sizeof(origURLBuf), &origURLBufSize);
 
-#if 0                           // Dead code here?
-  if (plugin) {
-    bool do_x_proto_check = true;
-    TSRemapRequestInfo rri;
-
-    // Get request port
-    rri.request_port = requestPort;
-
-    // Set request path
-    rri.request_path = requestPath;
-    rri.request_path_size = requestPathLen;
-
-    // Get request query
-    rri.request_query = request_url->query_get(&rri.request_query_size);
-
-    // Get toURL host
-    rri.remap_to_host = toHost;
-    rri.remap_to_host_size = toHostLen;
-
-    // Set "remap from" path
-    rri.remap_from_path = fromPath;
-    rri.remap_from_path_size = fromPathLen;
-
-    // Set "remap to" path        
-    rri.remap_to_path = toPath;
-    rri.remap_to_path_size = toPathLen;
-
-    rri.size = sizeof(rri);
-    rri.orig_url = &origURLBuf[0];
-    rri.orig_url_size = origURLBufSize;
-
-    rri.remap_from_port = map_from->port_get();
-    rri.remap_to_port = map_to->port_get();
-
-    // Set the schemes for this map
-    if (unlikely(mapPtr->wildcard_from_scheme)) {
-      rri.from_scheme = request_url->scheme_get(&rri.from_scheme_len);
-    } else {
-      rri.from_scheme = map_from->scheme_get(&rri.from_scheme_len);
-    }
-    rri.to_scheme = map_to->scheme_get(&rri.to_scheme_len);
-    rri.require_ssl = -1;       // By default, the plugin will not modify the to_scheme
-
-    // Used to see if plugin changed anything.
-    rri.new_port = (rri.new_host_size = (rri.new_path_size = (rri.redirect_url_size = (rri.new_query_size
= 0))));
-
-    // Get fromURL Host
-    rri.remap_from_host = map_from->host_get(&rri.remap_from_host_size);
-    // Get request Host
-    rri.request_host = request_url->host_get(&rri.request_host_size);
-    // Copy client IP address
-    rri.client_ip = s ? s->client_info.ip : 0;
-
-    // Get Cookie header        
-    if (request_header->presence(MIME_PRESENCE_COOKIE)) {
-      rri.request_cookie = request_header->value_get(MIME_FIELD_COOKIE, MIME_LEN_COOKIE,
&rri.request_cookie_size);
-    } else {
-      rri.request_cookie = NULL;
-      rri.request_cookie_size = 0;
-    }
-    // Prepare State for the future
-    if (s) {
-      s->fp_tsremap_os_response = plugin->fp_tsremap_os_response;
-      s->remap_plugin_instance = mapPtr->remap_plugin_instance;
-    }
-
-    plugin_retcode =
-      plugin->fp_tsremap_remap(mapPtr->remap_plugin_instance, s ? (rhandle) (s->state_machine)
: NULL, &rri);
-
-    // First step after plugin remap must be "redirect url" check
-    if (redirect && plugin_retcode && rri.redirect_url_size > 0) {
-      *redirect =
-        rri.redirect_url[0] ? xstrndup(rri.redirect_url, rri.redirect_url_size) : xstrdup("http://www.apache.org");
-      return rri.redirect_url_size;     // we must return redirect buffer immeditely
-    }
-
-    if (plugin_retcode) {
-      // Modify the host
-      if (rri.new_host_size > 0) {
-        request_url->host_set(rri.new_host, rri.new_host_size);
-        plugin_modified_host = true;
-      }
-      // Modify the port, but only if it's different than the request port
-      if (rri.new_port != 0) {
-        if (requestPort != rri.new_port)
-          request_url->port_set(rri.new_port);
-        plugin_modified_port = true;
-      }
-      // Modify the path
-      if (rri.new_path_size != 0) {
-        if (rri.new_path_size < 0)
-          request_url->path_set(NULL, 0);
-        else
-          request_url->path_set(rri.new_path, rri.new_path_size);
-        plugin_modified_path = true;
-      }
-      // Finally, update the query string. This has a special case, where a negative
-      // size value means to remove the query string entirely.
-      if (rri.new_query_size != 0) {
-        if (rri.new_query_size < 0)
-          request_url->query_set(NULL, 0);
-        else
-          request_url->query_set(rri.new_query, rri.new_query_size);
-      }
-      // If require_ssl is set, make sure our toScheme is SSL'ified. It's done this way
-      // to avoid dealing with weirness (say, a plugin trying to modify the "toScheme"
-      // from FTP to HTTPS).
-      if (rri.require_ssl != -1) {
-        // TODO add other protocols here if/when necessary
-        if (rri.require_ssl == 1)       // Plugin wish to turn on SSL (if not already set)
-        {
-          if ((rri.to_scheme_len == URL_LEN_HTTP) && (rri.to_scheme == URL_SCHEME_HTTP))
{
-            request_url->scheme_set(URL_SCHEME_HTTPS, URL_LEN_HTTPS);
-            do_x_proto_check = false;
-            Debug("url_rewrite", "Plugin changed protocol from HTTP to HTTPS");
-          }
-        } else                  // Plugin wish to turn off SSL (if already set)
-        {
-          if ((rri.to_scheme_len == URL_LEN_HTTPS) && (rri.to_scheme == URL_SCHEME_HTTPS))
{
-            request_url->scheme_set(URL_SCHEME_HTTP, URL_LEN_HTTP);
-            do_x_proto_check = false;
-            Debug("url_rewrite", "Plugin changed protocol from HTTPS to HTTP");
-          }
-        }
-      }
-      // Check to see if this a cross protocol mapping
-      //   If so we need to create a new URL since the URL*
-      //   we get from the request_hdr really points to a subclass
-      //   of URL that is specific to the protocol
-      //
-      if (do_x_proto_check && (rri.from_scheme != rri.to_scheme)) {
-        request_url->scheme_set(rri.to_scheme, rri.to_scheme_len);
-        if (is_debug_tag_set("url_rewrite")) {
-          char tmp_buf[2048];
-          Debug("url_rewrite", "Cross protocol mapping to %s in plugin",
-                request_url->string_get_buf(tmp_buf, (int) sizeof(tmp_buf)));
-        }
-      }
-    }
-  } else {
-    // Handle cross protocol mapping when there are no remap plugin(s).
-    // This is almost identical to above, but has to fetch the schemes.
-    int to_len, from_len;
-    const char *to_scheme = map_to->scheme_get(&to_len);
-
-    if (to_scheme != request_url->scheme_get(&from_len)) {
-      request_url->scheme_set(to_scheme, to_len);
-      if (is_debug_tag_set("url_rewrite")) {
-        char tmp_buf[2048];
-        Debug("url_rewrite", "Cross protocol mapping to %s",
-              request_url->string_get_buf(tmp_buf, (int) sizeof(tmp_buf)));
-      }
-    }
-  }
-#endif
-
   // Fall back to "remap" maps if plugin didn't change things already
   if (!plugin_modified_host)
     request_url->host_set(toHost, toHostLen);



Mime
View raw message