Retrieve the parameter with the given name * Something like 'JSESSIONID=12345...N' */
| 137 | * Something like 'JSESSIONID=12345...N' |
| 138 | */ |
| 139 | static char *get_path_param(apr_pool_t *pool, char *url, |
| 140 | const char *name, int scolon_sep) |
| 141 | { |
| 142 | char *path = NULL; |
| 143 | char *pathdelims = "?&"; |
| 144 | |
| 145 | if (scolon_sep) { |
| 146 | pathdelims = ";?&"; |
| 147 | } |
| 148 | for (path = strstr(url, name); path; path = strstr(path + 1, name)) { |
| 149 | path += strlen(name); |
| 150 | if (*path == '=') { |
| 151 | /* |
| 152 | * Session path was found, get its value |
| 153 | */ |
| 154 | ++path; |
| 155 | if (*path) { |
| 156 | char *q; |
| 157 | path = apr_strtok(apr_pstrdup(pool, path), pathdelims, &q); |
| 158 | return path; |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | return NULL; |
| 163 | } |
| 164 | |
| 165 | static char *get_cookie_param(request_rec *r, const char *name) |
| 166 | { |
no outgoing calls
no test coverage detected