From 78955e1f527c91ccdce4c6d41dd1f1e4ae64a95d Mon Sep 17 00:00:00 2001 From: Andrew Hanushevsky Date: Wed, 7 Oct 2015 18:47:54 -0700 Subject: [PATCH] Revert "Do not forward the 'tried=' CGI within the proxy interface." --- src/XrdPss/XrdPss.cc | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/XrdPss/XrdPss.cc b/src/XrdPss/XrdPss.cc index 05403820cb0..a747f90b6ee 100644 --- a/src/XrdPss/XrdPss.cc +++ b/src/XrdPss/XrdPss.cc @@ -973,26 +973,9 @@ const char *XrdPssSys::P2CGI(int &cgilen, char *cbuff, int cblen, if (!Cgi1) {cgilen = strlen(Cgi2); return Cgi2;} if (!Cgi2) return Cgi1; -// Strip out any 'tried=' -// Then, Compose the two cgi elements together - const char * tried_loc = strstr(Cgi1, "tried="); - if (tried_loc != NULL) { - const char *next_amp = strchr(tried_loc, '&'); - size_t bytes_to_copy = tried_loc-Cgi1; - if (bytes_to_copy >= static_cast(cblen)) {return NULL;} - memcpy(cbuff, Cgi1, bytes_to_copy); - cgilen = bytes_to_copy; - if (next_amp) - { - cgilen += snprintf(cbuff+bytes_to_copy, cblen-bytes_to_copy, "%s&%s", next_amp, Cgi2); - } - else - { - cgilen += snprintf(cbuff+bytes_to_copy, cblen-bytes_to_copy, "&%s", Cgi2); - } - } else { - cgilen = snprintf(cbuff, cblen, "%s&%s", Cgi1, Cgi2); - } +// Compose the two cgi elements together +// + cgilen = snprintf(cbuff, cblen, "%s&%s", Cgi1, Cgi2); return (cgilen >= cblen ? 0 : cbuff); }