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 2011/06/01 23:49:00 UTC
svn commit: r1130314 - in /trafficserver/traffic/branches/3.0.x: STATUS
proxy/http/remap/UrlRewrite.cc
Author: zwoop
Date: Wed Jun 1 21:49:00 2011
New Revision: 1130314
URL: http://svn.apache.org/viewvc?rev=1130314&view=rev
Log:
Added the missing SVN link, and updated code with all changes
Modified:
trafficserver/traffic/branches/3.0.x/STATUS
trafficserver/traffic/branches/3.0.x/proxy/http/remap/UrlRewrite.cc
Modified: trafficserver/traffic/branches/3.0.x/STATUS
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/3.0.x/STATUS?rev=1130314&r1=1130313&r2=1130314&view=diff
==============================================================================
--- trafficserver/traffic/branches/3.0.x/STATUS (original)
+++ trafficserver/traffic/branches/3.0.x/STATUS Wed Jun 1 21:49:00 2011
@@ -46,6 +46,7 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
configuration that is free()'d back to the heap. This is bad.
Trunk patch: http://svn.apache.org/viewvc?rev=1129268&view=rev
http://svn.apache.org/viewvc?rev=1129704&view=rev
+ http://svn.apache.org/viewvc?rev=1129924&view=rev
Jira: https://issues.apache.org/jira/browse/TS-798
+1: zwoop, ericb, bcall
Modified: trafficserver/traffic/branches/3.0.x/proxy/http/remap/UrlRewrite.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/3.0.x/proxy/http/remap/UrlRewrite.cc?rev=1130314&r1=1130313&r2=1130314&view=diff
==============================================================================
--- trafficserver/traffic/branches/3.0.x/proxy/http/remap/UrlRewrite.cc (original)
+++ trafficserver/traffic/branches/3.0.x/proxy/http/remap/UrlRewrite.cc Wed Jun 1 21:49:00 2011
@@ -1390,7 +1390,8 @@ UrlRewrite::BuildTable()
if (bti.paramv[3] != NULL)
u_mapping->tag = xstrdup(&(bti.paramv[3][0]));
if (!TableInsert(forward_mappings.hash_lookup, u_mapping, ipv4_name)) {
- goto MAP_WARNING;
+ errStr = "Unable to add mapping rule to lookup table";
+ goto MAP_ERROR;
}
num_rules_forward++;
SetHomePageRedirectFlag(u_mapping, u_mapping->toUrl);
@@ -1452,8 +1453,10 @@ UrlRewrite::BuildTable()
// type would have been dealt with much before this
break;
}
- if (!add_result)
- goto MAP_WARNING;
+ if (!add_result) {
+ errStr = "Unable to add mapping rule to lookup table";
+ goto MAP_ERROR;
+ }
if (unlikely(fromHost_lower_ptr))
fromHost_lower_ptr = (char *) xfree_null(fromHost_lower_ptr);
@@ -1464,19 +1467,10 @@ UrlRewrite::BuildTable()
// Deal with error / warning scenarios
MAP_ERROR:
+ Warning("Could not add rule at line #%d; Aborting!", cln + 1);
snprintf(errBuf, sizeof(errBuf), "%s %s at line %d", modulePrefix, errStr, cln + 1);
SignalError(errBuf, alarm_already);
- ink_error(errBuf);
-
- MAP_WARNING:
- Warning("Could not add rule at line #%d; Continuing with remaining lines", cln + 1);
- if (new_mapping) {
- delete new_mapping;
- new_mapping = NULL;
- }
- cur_line = tokLine(NULL, &tok_state);
- ++cln;
- continue;
+ ink_fatal(1, errBuf);
} /* end of while(cur_line != NULL) */
clear_xstr_array(bti.paramv, sizeof(bti.paramv) / sizeof(char *));