trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1227263 - in /trafficserver/traffic/trunk: CHANGES proxy/hdrs/URL.cc proxy/hdrs/URL.h
Date Wed, 04 Jan 2012 18:53:31 GMT
Author: zwoop
Date: Wed Jan  4 18:53:31 2012
New Revision: 1227263

URL: http://svn.apache.org/viewvc?rev=1227263&view=rev
Log:
Revert "TS-998: Distinguish between normal URLs and proxy URLs containing routing info."

This reverts commit a2695f503906a4d588dbfa114b42cbe52547c282.

Modified:
    trafficserver/traffic/trunk/CHANGES
    trafficserver/traffic/trunk/proxy/hdrs/URL.cc
    trafficserver/traffic/trunk/proxy/hdrs/URL.h

Modified: trafficserver/traffic/trunk/CHANGES
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/CHANGES?rev=1227263&r1=1227262&r2=1227263&view=diff
==============================================================================
--- trafficserver/traffic/trunk/CHANGES (original)
+++ trafficserver/traffic/trunk/CHANGES Wed Jan  4 18:53:31 2012
@@ -41,8 +41,6 @@ Changes with Apache Traffic Server 3.1.2
 
   *) [TS-1022] Use size specific types for serialized data in binary logs.
 
-  *) [TS-998] Distinguish normal URLs from proxy URLs containing routing info.
-
 Changes with Apache Traffic Server 3.1.1
   *) [TS-1020] Make logging to a named pipe work on Solaris.
 

Modified: trafficserver/traffic/trunk/proxy/hdrs/URL.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/URL.cc?rev=1227263&r1=1227262&r2=1227263&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/URL.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/URL.cc Wed Jan  4 18:53:31 2012
@@ -1060,8 +1060,6 @@ url_parse(HdrHeap * heap, URLImpl * url,
 
   cur = *start;
 
-  url->is_normal = (*cur == '/');
-
 skip_ws:
   if (ParseRules::is_ws(*cur)) {
     GETNEXT(eof);
@@ -1532,36 +1530,34 @@ url_print(URLImpl * url, char *buf_start
 {
 #define TRY(x)  if (!x) return 0
 
-  if (!url_is_normal) {  /* URL is proxyreq containing routing components */
-    if (url->m_ptr_scheme) {
-      TRY(mime_mem_print(url->m_ptr_scheme, url->m_len_scheme,
-                         buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      if ((url->m_scheme_wks_idx >= 0) && (hdrtoken_index_to_wks(url->m_scheme_wks_idx)
== URL_SCHEME_FILE)) {
-        TRY(mime_mem_print(":", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      } else {
-        TRY(mime_mem_print("://", 3, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      }
+  if (url->m_ptr_scheme) {
+    TRY(mime_mem_print(url->m_ptr_scheme, url->m_len_scheme,
+                       buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+    if ((url->m_scheme_wks_idx >= 0) && (hdrtoken_index_to_wks(url->m_scheme_wks_idx)
== URL_SCHEME_FILE)) {
+      TRY(mime_mem_print(":", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+    } else {
+      TRY(mime_mem_print("://", 3, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
     }
+  }
 
-    if (url->m_ptr_user) {
-      TRY(mime_mem_print(url->m_ptr_user, url->m_len_user,
+  if (url->m_ptr_user) {
+    TRY(mime_mem_print(url->m_ptr_user, url->m_len_user,
+                       buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+    if (url->m_ptr_password) {
+      TRY(mime_mem_print(":", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+      TRY(mime_mem_print(url->m_ptr_password, url->m_len_password,
                          buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      if (url->m_ptr_password) {
-        TRY(mime_mem_print(":", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-        TRY(mime_mem_print(url->m_ptr_password, url->m_len_password,
-                           buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      }
-      TRY(mime_mem_print("@", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
     }
+    TRY(mime_mem_print("@", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+  }
 
-    if (url->m_ptr_host) {
-      TRY(mime_mem_print(url->m_ptr_host, url->m_len_host,
+  if (url->m_ptr_host) {
+    TRY(mime_mem_print(url->m_ptr_host, url->m_len_host,
+                       buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+    if (url->m_ptr_port && url->m_port) {
+      TRY(mime_mem_print(":", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
+      TRY(mime_mem_print(url->m_ptr_port, url->m_len_port,
                          buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      if (url->m_ptr_port && url->m_port) {
-        TRY(mime_mem_print(":", 1, buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-        TRY(mime_mem_print(url->m_ptr_port, url->m_len_port,
-                           buf_start, buf_length, buf_index_inout, buf_chars_to_skip_inout));
-      }
     }
   }
 

Modified: trafficserver/traffic/trunk/proxy/hdrs/URL.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/URL.h?rev=1227263&r1=1227262&r2=1227263&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/URL.h (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/URL.h Wed Jan  4 18:53:31 2012
@@ -83,9 +83,6 @@ struct URLImpl:public HdrHeapObjImpl
 
   // Sanity Check Functions
   void check_strings(HeapCheck *heaps, int num_heaps);
-
-  // Is this a normal or a (forward) proxy request?
-  bool is_normal;
 };
 
 



Mime
View raw message