Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-285

get_path_param in mod_proxy_cluster doesn't expect ';' as separator

    XMLWordPrintable

Details

    Description

      Current version of get_path_param doesn't expect ';' as path parameters separator so this urls are not correctly handled:

      /test.jsp;jsessionid=123123.NODE01;name=vale

      See for instance the mod_proxy_balancer implementation (in httpd 2.2.21):

      /* Retrieve the parameter with the given name
       * Something like 'JSESSIONID=12345...N'
       */
      static char *get_path_param(apr_pool_t *pool, char *url,
                                  const char *name, int scolon_sep)
      {
          char *path = NULL;
          char *pathdelims = "?&";
      
          if (scolon_sep) {
              pathdelims = ";?&";
          }
          for (path = strstr(url, name); path; path = strstr(path + 1, name)) {
              path += strlen(name);
              if (*path == '=') {
                  /*
                   * Session path was found, get it's value
                   */
                  ++path;
                  if (strlen(path)) {
                      char *q;
                      path = apr_strtok(apr_pstrdup(pool, path), pathdelims, &q);
                      return path;
                  }
              }
          }
          return NULL;
      }
      

      Severity of this bug to me is not so high since using more than one path parameters is not so common.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-rhusar Radoslav Husar
              nichele_jira Stefano Nichele (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: