Преглед на файлове

HPCC-13421 Add roxie support for '#anchor' URLs

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Anthony Fishbeck преди 9 години
родител
ревизия
7b7fe9715e
променени са 1 файла, в които са добавени 9 реда и са изтрити 5 реда
  1. 9 5
      common/thorhelper/roxiehelper.cpp

+ 9 - 5
common/thorhelper/roxiehelper.cpp

@@ -1646,27 +1646,31 @@ int readHttpHeaderLine(IBufferedSocket *linereader, char *headerline, unsigned m
     return bytesread;
 }
 
+inline bool endOfParameters(const char *str)
+{
+    return (*str==0 || *str=='#');
+}
 void parseHttpParameterString(IProperties *p, const char *str)
 {
-    while (*str)
+    while (!endOfParameters(str))
     {
         StringBuffer s, prop, val;
-        while (*str && *str != '&' && *str != '=')
+        while (!endOfParameters(str) && *str != '&' && *str != '=')
             s.append(*str++);
         appendDecodedURL(prop, s.trim());
-        if (!*str || *str == '&')
+        if (endOfParameters(str) || *str == '&')
             val.set("1");
         else
         {
             s.clear();
             str++;
-            while (*str && *str != '&')
+            while (!endOfParameters(str) && *str != '&')
                 s.append(*str++);
             appendDecodedURL(val, s.trim());
         }
         if (prop.length())
             p->setProp(prop, val);
-        if (*str)
+        if (!endOfParameters(str))
             str++;
     }
 }