Changeset 22524

Show
Ignore:
Timestamp:
06/15/09 21:44:03 (1 year ago)
Author:
piotras
Message:

Check if url is not a part of get method. Refs #1209

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midgard/core/midgard/src/midgard_http_host.c

    r21529 r22524  
    5151 
    5252        /* This is '/' request */ 
    53         if(!s) { 
     53        /* Also check if uri is not get method string */ 
     54        if(!s || (s && (*s)[0] == '?')) { 
    5455                self->uri = g_strdup(uri); 
    5556                self->prefix = NULL; 
     
    6061        /* note that we start from 1 ( which is empty or null value before '/' ) */ 
    6162        while(s[i] != NULL){ 
    62          
     63 
     64                /* Check if it's not part of get method */ 
     65                gchar *getmark = g_strstr_len((const gchar *)s[i], strlen(s[i]), "?"); 
     66                if (getmark) 
     67                        break; 
     68 
    6369                /* We do not need empty string after the trailing slash, 
    6470                 * or arguments from url like /a//b/. */