You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2010/11/12 02:39:24 UTC

svn commit: r1034240 - in /trafficserver/traffic/trunk/proxy: ControlMatcher.cc hdrs/HTTP.cc hdrs/HTTP.h

Author: amc
Date: Fri Nov 12 01:39:24 2010
New Revision: 1034240

URL: http://svn.apache.org/viewvc?rev=1034240&view=rev
Log:
Patch for problems with original TS-526 patch

Modified:
    trafficserver/traffic/trunk/proxy/ControlMatcher.cc
    trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc
    trafficserver/traffic/trunk/proxy/hdrs/HTTP.h

Modified: trafficserver/traffic/trunk/proxy/ControlMatcher.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/ControlMatcher.cc?rev=1034240&r1=1034239&r2=1034240&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/ControlMatcher.cc (original)
+++ trafficserver/traffic/trunk/proxy/ControlMatcher.cc Fri Nov 12 01:39:24 2010
@@ -58,7 +58,7 @@ char *
 HttpRequestData::get_string()
 {
   char *str = hdr->url_string_get(NULL);
-  unescapifyStr(str);
+  if (str) unescapifyStr(str);
   return str;
 }
 

Modified: trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc?rev=1034240&r1=1034239&r2=1034240&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/HTTP.cc Fri Nov 12 01:39:24 2010
@@ -1527,14 +1527,14 @@ char*
 HTTPHdr::url_string_get(Arena* arena, int* length) {
   char *zret = 0;
 
+  if (length) *length = 0;
+  this->_test_and_fill_target_cache();
   if (m_url_cached.valid()) {
     URLImpl* ui = m_url_cached.m_url_impl;
     bool should_reset_host = false;
     bool should_reset_port = false;
     char port_buff[10];
 
-    this->_test_and_fill_target_cache();
-
     /* Get dirty. We reach in to the URL implementation to
        set the host and port if
        1) They are not already set and

Modified: trafficserver/traffic/trunk/proxy/hdrs/HTTP.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/hdrs/HTTP.h?rev=1034240&r1=1034239&r2=1034240&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/hdrs/HTTP.h (original)
+++ trafficserver/traffic/trunk/proxy/hdrs/HTTP.h Fri Nov 12 01:39:24 2010
@@ -622,7 +622,7 @@ public:
   /// Mark the target cache as invalid.
   /// @internal Ugly but too many places currently that touch the
   /// header internals, they must be able to do this.
-  void mark_target_dirty();
+  void mark_target_dirty() const;
 
   HTTPStatus status_get();
   void status_set(HTTPStatus status);
@@ -944,7 +944,7 @@ HTTPHdr::is_port_in_header() const
   -------------------------------------------------------------------------*/
 
 inline void
-HTTPHdr::mark_target_dirty()
+HTTPHdr::mark_target_dirty() const
 {
   m_target_cached = false;
 }
@@ -1063,6 +1063,7 @@ HTTPHdr::url_get() const
   if (m_url_cached.m_url_impl != real_impl) {
     m_url_cached.set(this);
     m_url_cached.m_url_impl = real_impl;
+    this->mark_target_dirty();
   }
   return (&m_url_cached);
 }