Lines Matching refs:path
138 * Escape the globbing characters in a path used as argument to
146 static const char *ftp_escape_globbingchars(apr_pool_t *p, const char *path, proxy_ftp_dir_conf *dconf)
152 return path;
155 ret = apr_palloc(p, 2*strlen(path)+sizeof(""));
156 for (d = ret; *path; ++path) {
157 if (strchr(FTP_GLOBBING_CHARS, *path) != NULL)
159 *d++ = *path;
166 * Check for globbing characters in a path used as argument to
171 static int ftp_check_globbingchars(const char *path)
173 for ( ; *path; ++path) {
174 if (*path == '\\')
175 ++path;
176 if (*path != '\0' && strchr(FTP_GLOBBING_CHARS, *path) != NULL)
291 char *user, *password, *host, *path, *parms, *strp, sport[7];
316 /* now parse path/parameters args, according to rfc1738 */
318 * N.B. if this isn't a true proxy request, then the URL path (but not
320 * of a ; being decoded into the path.
333 path = ap_proxy_canonenc(p, url, strlen(url), enc_path, 0, r->proxyreq);
334 if (path == NULL)
336 if (!ftp_check_string(path))
350 path = apr_pstrcat(p, path, "?", strp, NULL);
368 (user != NULL) ? "@" : "", host, sport, "/", path,
451 char *dir, *path, *reldir, *site, *str, *type;
471 const char *basedir = ""; /* By default, path is relative to the $HOME dir */
493 /* ... and path without query args */
494 path = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITSITEPART | APR_URI_UNP_OMITQUERY);
496 /* If path began with /%2f, change the basedir */
497 if (strncasecmp(path, "/%2f", 4) == 0) {
502 if ((type = strstr(path, ";type=")) != NULL)
505 (void)decodeenc(path);
507 while (path[1] == '/') /* collapse multiple leading slashes to one */
508 ++path;
510 reldir = strrchr(path, '/');
516 /* Copy path, strip (all except the last) trailing slashes */
518 path = dir = apr_pstrcat(p, path, "/", NULL);
519 for (n = strlen(path); n > 1 && path[n - 1] == '/' && path[n - 2] == '/'; --n)
520 path[n - 1] = '\0';
526 escpath = ap_escape_html(p, path);
540 for (dir = path+1; (dir = strchr(dir, '/')) != NULL; )
543 if ((reldir = strrchr(path+1, '/'))==NULL) {
544 reldir = path+1;
548 /* print "path/" component */
550 ap_escape_uri(p, path),
568 if (pwd == NULL || strncmp(pwd, path, strlen(pwd)) == 0) {
985 char *path, *strp, *type_suffix, *cwd = NULL;
1032 /* We break the URL into host, port, path-search */
1040 path = apr_pstrdup(p, uri.path);
1045 path = apr_pstrdup(p, r->parsed_uri.path);
1050 path = (path != NULL && path[0] != '\0') ? &path[1] : "";
1052 type_suffix = strchr(path, ';');
1331 if (strncasecmp(path, "%2f", 3) == 0) {
1332 path += 3;
1333 while (*path == '/') /* skip leading '/' (after root %2f) */
1334 ++path;
1352 strp = strchr(path, '/');
1357 decodeenc(path); /* Note! This decodes a %2f -> "/" */
1359 if (strchr(path, '/')) { /* are there now any '/' characters? */
1364 /* NOTE: FTP servers do globbing on the path.
1370 ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
1396 path = strp + 1;
1698 /* set request; "path" holds last path component */
1699 len = decodeenc(path);
1701 if (strchr(path, '/')) { /* are there now any '/' characters? */
1710 if (len == 0 || (ftp_check_globbingchars(path) && fdconf->ftp_list_on_wildcard)) {
1731 ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
1754 ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
1778 path = "";
1795 /* Note that we do not escape the path here, to allow for
1799 buf = apr_pstrcat(p, "LIST ", path, CRLF, NULL);
1819 rc = proxy_ftp_command(apr_pstrcat(p, "MDTM ", ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
1858 buf = apr_pstrcat(p, "RETR ", ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL);
1899 ftp_escape_globbingchars(p, path, fdconf), CRLF, NULL),
2176 RSRC_CONF|ACCESS_CONF, "Whether wildcard characters in a path cause mod_proxy_ftp to list the files instead of trying to get them. Defaults to on."),