maxb = nb;
}
- nb = ((ut > URL_IS_DASH && ut != URL_IS_FTP) ? (path - av[j]) : 0);
+ nb = ((ut == URL_IS_PATH) ? (path - av[j]) : 0);
maxb += nb;
maxb += 1;
globURL = globRoot = xmalloc(maxb);
switch (ut) {
- case URL_IS_HTTPS:
- case URL_IS_HTTP:
case URL_IS_PATH:
case URL_IS_DASH:
strncpy(globRoot, av[j], nb);
/*@switchbreak@*/ break;
+ case URL_IS_HTTPS:
+ case URL_IS_HTTP:
case URL_IS_FTP:
case URL_IS_UNKNOWN:
+ default:
/*@switchbreak@*/ break;
}
globRoot += nb;
return ret;
}
-#ifndef DYING
+#ifdef DYING
static void hexdump(const unsigned char * buf, ssize_t len)
/*@*/
{
if (_dav_debug < 0)
fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, count, rc);
+#ifdef DYING
if (count > 0)
hexdump(buf, count);
+#endif
return rc;
}
int ac, nac;
int rc;
+ /* HACK: glob does not pass dirs with trailing '/' */
+ nb = strlen(path)+1;
+ if (path[nb-1] != '/') {
+ char * t = alloca(nb+1);
+ *t = '\0';
+ (void) stpcpy( stpcpy(t, path), "/");
+ path = t;
+ }
+
if (_dav_debug < 0)
fprintf(stderr, "*** davOpendir(%s)\n", path);
extern int noNeon;
-#define HTTPSPATH "https://wellfleet.jbj.org/test.txt"
-#define HTTPPATH "http://wellfleet.jbj.org/test.txt"
-#define FTPPATH "ftp://wellfleet.jbj.org/test.txt"
+#define HTTPSPATH "https://localhost/test.txt"
+#define HTTPPATH "http://localhost/test.txt"
+#define FTPPATH "ftp://localhost/test.txt"
#define DIRPATH "/var/ftp/test.txt"
static char * httpspath = HTTPSPATH;
static char * httppath = HTTPPATH;
_av_debug = -1;
_ftp_debug = -1;
_dav_debug = 1;
-#if 0
+#if 1
readFile(dirpath);
#endif
-#if 0
+#if 1
readFile(ftppath);
readFile(ftppath);
readFile(ftppath);
readFile(httppath);
readFile(httppath);
#endif
-#if 0
+#if 1
readFile(httpspath);
readFile(httpspath);
readFile(httpspath);
static int _debug = 0;
+extern int noNeon;
+
#define HTTPSPATH "https://localhost/rawhide/test/*.rpm"
+#if 0
#define HTTPPATH "http://localhost/rawhide/test/*.rpm"
+#else
+#define HTTPPATH "http://localhost/rawhide/*.rpm"
+#endif
#define FTPPATH "ftp://localhost/pub/rawhide/packages/test/*.rpm"
-#define DIRPATH "/var/ftp/pub/rawhide/packages/test"
+#define DIRPATH "/var/ftp/pub/rawhide/packages/test/*.rpm"
static char * dirpath = DIRPATH;
static char * ftppath = FTPPATH;
static char * httppath = HTTPPATH;
{ "debug", 'd', POPT_ARG_VAL, &_debug, -1, NULL, NULL },
{ "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
N_("debug protocol data stream"), NULL},
+ { "noneon", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &noNeon, 1,
+ N_("disable use of libneon for HTTP"), NULL},
{ "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
N_("debug rpmio I/O"), NULL},
{ "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
_av_debug = -1;
_ftp_debug = -1;
_dav_debug = -1;
+#if 0
printGlob(dirpath);
printGlob(ftppath);
+#endif
printGlob(httppath);
+#if 0
printGlob(httpspath);
+#endif
return 0;
}