]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-no-neon.patch
- updated
[packages/rpm.git] / rpm-no-neon.patch
1 diff -ur rpm-4.4.7.org/configure.ac rpm-4.4.7/configure.ac
2 --- rpm-4.4.7.org/configure.ac  2006-10-17 22:12:03.110624000 +0200
3 +++ rpm-4.4.7/configure.ac      2006-10-17 22:12:43.117124500 +0200
4 @@ -530,33 +530,6 @@
5  AC_SUBST(WITH_BEECRYPT_INCLUDE)
6  AC_SUBST(WITH_BEECRYPT_LIB)
7  
8 -#=================
9 -# Check for neon library. Prefer external, otherwise internal.
10 -WITH_NEON_SUBDIR=
11 -WITH_NEON_INCLUDE=
12 -WITH_NEON_LIB=
13 -AC_CHECK_HEADER([neon/ne_session.h], [
14 -  AC_CHECK_LIB(neon, ne_session_create, [
15 -    AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
16 -    AC_CHECK_LIB(neon, ne_get_response_header, [
17 -      AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
18 -    ])
19 -    AC_CHECK_LIB(neon, ne_send_request_chunk, [
20 -       AC_DEFINE(HAVE_NEON_NE_SEND_REQUEST_CHUNK, 1, [Define to 1 if you have ne_send_request_chunk() in libneon.])
21 -    ])
22 -    WITH_NEON_INCLUDE="-I${includedir}/neon"
23 -    WITH_NEON_LIB="-lneon"
24 -  ])
25 -],[
26 -  if test -d neon ; then
27 -    AC_DEFINE(HAVE_LIBNEON, 1, [Define to 1 if you have the 'neon' library (-lneon).])
28 -# XXX HAVE_NEON_NE_GET_RESPONSE_HEADER assumes libneon-0.25 devel internal
29 -    AC_DEFINE(HAVE_NEON_NE_GET_RESPONSE_HEADER, 1, [Define to 1 if you have ne_get_response_header() in libneon.])
30 -    WITH_NEON_SUBDIR=neon
31 -    WITH_NEON_INCLUDE="-I\${top_srcdir}/${WITH_NEON_SUBDIR}/src"
32 -    WITH_NEON_LIB="\${top_builddir}/${WITH_NEON_SUBDIR}/src/libneon.la"
33 -  fi
34 -])
35  AC_SUBST(WITH_NEON_SUBDIR)
36  AC_SUBST(WITH_NEON_INCLUDE)
37  AC_SUBST(WITH_NEON_LIB)
38 diff -ur rpm-4.4.7.org/rpmio/rpmdav.c rpm-4.4.7/rpmio/rpmdav.c
39 --- rpm-4.4.7.org/rpmio/rpmdav.c        2006-04-17 17:23:29.000000000 +0200
40 +++ rpm-4.4.7/rpmio/rpmdav.c    2006-10-17 22:14:01.150001250 +0200
41 @@ -9,31 +9,6 @@
42  #include <pthread.h>
43  #endif
44  
45 -#include "ne_alloc.h"
46 -#include "ne_auth.h"
47 -#include "ne_basic.h"
48 -#include "ne_dates.h"
49 -#include "ne_locks.h"
50 -
51 -#define        NEONBLOWSCHUNKS
52 -#ifndef        NEONBLOWSCHUNKS
53 -/* HACK: include ne_private.h to access sess->socket for now. */
54 -#include "../neon/src/ne_private.h"
55 -#endif
56 -
57 -#include "ne_props.h"
58 -#include "ne_request.h"
59 -#include "ne_socket.h"
60 -#include "ne_string.h"
61 -#include "ne_utils.h"
62 -
63 -/* XXX API changes for neon-0.26.0 */
64 -#if !defined(NE_FREE)
65 -#define        ne_set_persist(_sess, _flag)
66 -#define        ne_propfind_set_private(_pfh, _create_item, NULL) \
67 -       ne_propfind_set_private(_pfh, _create_item, NULL, NULL)
68 -#endif
69 -
70  #include <rpmio_internal.h>
71  
72  #define _RPMDAV_INTERNAL
73 @@ -69,1332 +44,6 @@
74  }
75  
76  /* =============================================================== */
77 -static int davFree(urlinfo u)
78 -       /*@globals internalState @*/
79 -       /*@modifies u, internalState @*/
80 -{
81 -    if (u != NULL && u->sess != NULL) {
82 -       u->capabilities = _free(u->capabilities);
83 -       if (u->lockstore != NULL)
84 -           ne_lockstore_destroy(u->lockstore);
85 -       u->lockstore = NULL;
86 -       ne_session_destroy(u->sess);
87 -       u->sess = NULL;
88 -    }
89 -    return 0;
90 -}
91 -
92 -static void davProgress(void * userdata, off_t current, off_t total)
93 -       /*@*/
94 -{
95 -    urlinfo u = userdata;
96 -    ne_session * sess;
97 -
98 -assert(u != NULL);
99 -    sess = u->sess;
100 -assert(sess != NULL);
101 -assert(u == ne_get_session_private(sess, "urlinfo"));
102 -
103 -    u->current = current;
104 -    u->total = total;
105 -
106 -if (_dav_debug < 0)
107 -fprintf(stderr, "*** davProgress(%p,0x%x:0x%x) sess %p u %p\n", userdata, (unsigned int)current, (unsigned int)total, sess, u);
108 -}
109 -
110 -static void davNotify(void * userdata,
111 -               ne_conn_status connstatus, const char * info)
112 -       /*@*/
113 -{
114 -    urlinfo u = userdata;
115 -    ne_session * sess;
116 -    /*@observer@*/
117 -    static const char * connstates[] = {
118 -       "namelookup",
119 -       "connecting",
120 -       "connected",
121 -       "secure",
122 -       "unknown"
123 -    };
124 -
125 -assert(u != NULL);
126 -    sess = u->sess;
127 -assert(sess != NULL);
128 -assert(u == ne_get_session_private(sess, "urlinfo"));
129 -
130 -#ifdef REFERENCE
131 -typedef enum {
132 -    ne_conn_namelookup, /* lookup up hostname (info = hostname) */
133 -    ne_conn_connecting, /* connecting to host (info = hostname) */
134 -    ne_conn_connected, /* connected to host (info = hostname) */
135 -    ne_conn_secure /* connection now secure (info = crypto level) */
136 -} ne_conn_status;
137 -#endif
138 -
139 -    u->connstatus = connstatus;
140 -
141 -/*@-boundsread@*/
142 -if (_dav_debug < 0)
143 -fprintf(stderr, "*** davNotify(%p,%d,%p) sess %p u %p %s\n", userdata, connstatus, info, sess, u, connstates[ (connstatus < 4 ? connstatus : 4)]);
144 -/*@=boundsread@*/
145 -
146 -}
147 -
148 -static void davCreateRequest(ne_request * req, void * userdata,
149 -               const char * method, const char * uri)
150 -       /*@*/
151 -{
152 -    urlinfo u = userdata;
153 -    ne_session * sess;
154 -    void * private = NULL;
155 -    const char * id = "urlinfo";
156 -
157 -assert(u != NULL);
158 -assert(u->sess != NULL);
159 -assert(req != NULL);
160 -    sess = ne_get_session(req);
161 -assert(sess == u->sess);
162 -assert(u == ne_get_session_private(sess, "urlinfo"));
163 -
164 -assert(sess != NULL);
165 -    private = ne_get_session_private(sess, id);
166 -assert(u == private);
167 -
168 -if (_dav_debug < 0)
169 -fprintf(stderr, "*** davCreateRequest(%p,%p,%s,%s) %s:%p\n", req, userdata, method, uri, id, private);
170 -}
171 -
172 -static void davPreSend(ne_request * req, void * userdata, ne_buffer * buf)
173 -{
174 -    urlinfo u = userdata;
175 -    ne_session * sess;
176 -    const char * id = "fd";
177 -    FD_t fd = NULL;
178 -
179 -assert(u != NULL);
180 -assert(u->sess != NULL);
181 -assert(req != NULL);
182 -    sess = ne_get_session(req);
183 -assert(sess == u->sess);
184 -assert(u == ne_get_session_private(sess, "urlinfo"));
185 -
186 -    fd = ne_get_request_private(req, id);
187 -
188 -if (_dav_debug < 0)
189 -fprintf(stderr, "*** davPreSend(%p,%p,%p) sess %p %s %p\n", req, userdata, buf, sess, id, fd);
190 -if (_dav_debug)
191 -fprintf(stderr, "-> %s\n", buf->data);
192 -
193 -}
194 -
195 -static int davPostSend(ne_request * req, void * userdata, const ne_status * status)
196 -       /*@*/
197 -{
198 -    urlinfo u = userdata;
199 -    ne_session * sess;
200 -    const char * id = "fd";
201 -    FD_t fd = NULL;
202 -
203 -assert(u != NULL);
204 -assert(u->sess != NULL);
205 -assert(req != NULL);
206 -    sess = ne_get_session(req);
207 -assert(sess == u->sess);
208 -assert(u == ne_get_session_private(sess, "urlinfo"));
209 -
210 -    fd = ne_get_request_private(req, id);
211 -
212 -/*@-evalorder@*/
213 -if (_dav_debug < 0)
214 -fprintf(stderr, "*** davPostSend(%p,%p,%p) sess %p %s %p %s\n", req, userdata, status, sess, id, fd, ne_get_error(sess));
215 -/*@=evalorder@*/
216 -    return NE_OK;
217 -}
218 -
219 -static void davDestroyRequest(ne_request * req, void * userdata)
220 -       /*@*/
221 -{
222 -    urlinfo u = userdata;
223 -    ne_session * sess;
224 -    const char * id = "fd";
225 -    FD_t fd = NULL;
226 -
227 -assert(u != NULL);
228 -assert(u->sess != NULL);
229 -assert(req != NULL);
230 -    sess = ne_get_session(req);
231 -assert(sess == u->sess);
232 -assert(u == ne_get_session_private(sess, "urlinfo"));
233 -
234 -    fd = ne_get_request_private(req, id);
235 -
236 -if (_dav_debug < 0)
237 -fprintf(stderr, "*** davDestroyRequest(%p,%p) sess %p %s %p\n", req, userdata, sess, id, fd);
238 -}
239 -
240 -static void davDestroySession(void * userdata)
241 -       /*@*/
242 -{
243 -    urlinfo u = userdata;
244 -    ne_session * sess;
245 -    void * private = NULL;
246 -    const char * id = "urlinfo";
247 -
248 -assert(u != NULL);
249 -assert(u->sess != NULL);
250 -    sess = u->sess;
251 -assert(u == ne_get_session_private(sess, "urlinfo"));
252 -
253 -assert(sess != NULL);
254 -    private = ne_get_session_private(sess, id);
255 -assert(u == private);
256 -
257 -if (_dav_debug < 0)
258 -fprintf(stderr, "*** davDestroySession(%p) sess %p %s %p\n", userdata, sess, id, private);
259 -}
260 -
261 -static int
262 -davVerifyCert(void *userdata, int failures, const ne_ssl_certificate *cert)
263 -       /*@*/
264 -{
265 -    const char *hostname = userdata;
266 -
267 -if (_dav_debug < 0)
268 -fprintf(stderr, "*** davVerifyCert(%p,%d,%p) %s\n", userdata, failures, cert, hostname);
269 -
270 -    return 0;  /* HACK: trust all server certificates. */
271 -}
272 -
273 -static int davConnect(urlinfo u)
274 -       /*@globals internalState @*/
275 -       /*@modifies u, internalState @*/
276 -{
277 -    const char * path = NULL;
278 -    int rc;
279 -
280 -    /* HACK: hkp:// has no steenkin' options */
281 -    if (!(u->urltype == URL_IS_HTTP || u->urltype == URL_IS_HTTPS))
282 -       return 0;
283 -
284 -    /* HACK: where should server capabilities be read? */
285 -    (void) urlPath(u->url, &path);
286 -    /* HACK: perhaps capture Allow: tag, look for PUT permitted. */
287 -    rc = ne_options(u->sess, path, u->capabilities);
288 -    switch (rc) {
289 -    case NE_OK:
290 -       break;
291 -    case NE_ERROR:
292 -       /* HACK: "301 Moved Permanently" on empty subdir. */
293 -       if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
294 -           break;
295 -       /*@fallthrough@*/
296 -    case NE_CONNECT:
297 -    case NE_LOOKUP:
298 -    default:
299 -if (_dav_debug)
300 -fprintf(stderr, "*** Connect to %s:%d failed(%d):\n\t%s\n",
301 -                  u->host, u->port, rc, ne_get_error(u->sess));
302 -       break;
303 -    }
304 -
305 -    /* HACK: sensitive to error returns? */
306 -    u->httpVersion = (ne_version_pre_http11(u->sess) ? 0 : 1);
307 -
308 -    return rc;
309 -}
310 -
311 -static int davInit(const char * url, urlinfo * uret)
312 -       /*@globals internalState @*/
313 -       /*@modifies *uret, internalState @*/
314 -{
315 -    urlinfo u = NULL;
316 -    int rc = 0;
317 -
318 -/*@-globs@*/   /* FIX: h_errno annoyance. */
319 -    if (urlSplit(url, &u))
320 -       return -1;      /* XXX error returns needed. */
321 -/*@=globs@*/
322 -
323 -    if (u->url != NULL && u->sess == NULL)
324 -    switch (u->urltype) {
325 -    default:
326 -       assert(u->urltype != u->urltype);
327 -       /*@notreached@*/ break;
328 -    case URL_IS_HTTPS:
329 -    case URL_IS_HTTP:
330 -    case URL_IS_HKP:
331 -      {        ne_server_capabilities * capabilities;
332 -
333 -       /* HACK: oneshots should be done Somewhere Else Instead. */
334 -/*@-noeffect@*/
335 -       rc = ((_dav_debug < 0) ? NE_DBG_HTTP : 0);
336 -       ne_debug_init(stderr, rc);              /* XXX oneshot? */
337 -/*@=noeffect@*/
338 -       rc = ne_sock_init();                    /* XXX oneshot? */
339 -
340 -       u->lockstore = ne_lockstore_create();   /* XXX oneshot? */
341 -
342 -       u->capabilities = capabilities = xcalloc(1, sizeof(*capabilities));
343 -       u->sess = ne_session_create(u->scheme, u->host, u->port);
344 -
345 -       ne_lockstore_register(u->lockstore, u->sess);
346 -
347 -       if (u->proxyh != NULL)
348 -           ne_session_proxy(u->sess, u->proxyh, u->proxyp);
349 -
350 -#if 0
351 -       {   const ne_inet_addr ** addrs;
352 -           unsigned int n;
353 -           ne_set_addrlist(u->sess, addrs, n);
354 -       }
355 -#endif
356 -
357 -       ne_set_progress(u->sess, davProgress, u);
358 -       ne_set_status(u->sess, davNotify, u);
359 -
360 -       ne_set_persist(u->sess, 1);
361 -       ne_set_read_timeout(u->sess, httpTimeoutSecs);
362 -       ne_set_useragent(u->sess, PACKAGE "/" PACKAGE_VERSION);
363 -
364 -       /* XXX check that neon is ssl enabled. */
365 -       if (!strcasecmp(u->scheme, "https"))
366 -           ne_ssl_set_verify(u->sess, davVerifyCert, (char *)u->host);
367 -
368 -       ne_set_session_private(u->sess, "urlinfo", u);
369 -
370 -       ne_hook_destroy_session(u->sess, davDestroySession, u);
371 -
372 -       ne_hook_create_request(u->sess, davCreateRequest, u);
373 -       ne_hook_pre_send(u->sess, davPreSend, u);
374 -       ne_hook_post_send(u->sess, davPostSend, u);
375 -       ne_hook_destroy_request(u->sess, davDestroyRequest, u);
376 -
377 -       /* HACK: where should server capabilities be read? */
378 -       rc = davConnect(u);
379 -       if (rc)
380 -           goto exit;
381 -      }        break;
382 -    }
383 -
384 -exit:
385 -/*@-boundswrite@*/
386 -    if (rc == 0 && uret != NULL)
387 -       *uret = urlLink(u, __FUNCTION__);
388 -/*@=boundswrite@*/
389 -    u = urlFree(u, "urlSplit (davInit)");
390 -
391 -    return rc;
392 -}
393 -
394 -/* =============================================================== */
395 -enum fetch_rtype_e {
396 -    resr_normal = 0,
397 -    resr_collection,
398 -    resr_reference,
399 -    resr_error
400 -};
401 -
402 -struct fetch_resource_s {
403 -/*@dependent@*/
404 -    struct fetch_resource_s *next;
405 -    char *uri;
406 -/*@unused@*/
407 -    char *displayname;
408 -    enum fetch_rtype_e type;
409 -    size_t size;
410 -    time_t modtime;
411 -    int is_executable;
412 -    int is_vcr;    /* Is version resource. 0: no vcr, 1 checkin 2 checkout */
413 -    char *error_reason; /* error string returned for this resource */
414 -    int error_status; /* error status returned for this resource */
415 -};
416 -
417 -/*@null@*/
418 -static void *fetch_destroy_item(/*@only@*/ struct fetch_resource_s *res)
419 -       /*@modifies res @*/
420 -{
421 -    ne_free(res->uri);
422 -    ne_free(res->error_reason);
423 -    res = _free(res);
424 -    return NULL;
425 -}
426 -
427 -#ifdef UNUSED
428 -/*@null@*/
429 -static void *fetch_destroy_list(/*@only@*/ struct fetch_resource_s *res)
430 -       /*@modifies res @*/
431 -{
432 -    struct fetch_resource_s *next;
433 -/*@-branchstate@*/
434 -    for (; res != NULL; res = next) {
435 -       next = res->next;
436 -       res = fetch_destroy_item(res);
437 -    }
438 -/*@=branchstate@*/
439 -    return NULL;
440 -}
441 -#endif
442 -
443 -static void *fetch_create_item(/*@unused@*/ void *userdata, /*@unused@*/ const char *uri)
444 -        /*@*/
445 -{
446 -    struct fetch_resource_s * res = ne_calloc(sizeof(*res));
447 -    return res;
448 -}
449 -
450 -/* =============================================================== */
451 -struct fetch_context_s {
452 -/*@relnull@*/ /*@dependent@*/
453 -    struct fetch_resource_s **resrock;
454 -    const char *uri;
455 -    unsigned int include_target; /* Include resource at href */
456 -/*@refcounted@*/
457 -    urlinfo u;
458 -    int ac;
459 -    int nalloced;
460 -    ARGV_t av;
461 -    mode_t * modes;
462 -    size_t * sizes;
463 -    time_t * mtimes;
464 -};
465 -
466 -/*@null@*/
467 -static void *fetch_destroy_context(/*@only@*/ /*@null@*/ struct fetch_context_s *ctx)
468 -       /*@globals internalState @*/
469 -       /*@modifies ctx, internalState @*/
470 -{
471 -    if (ctx == NULL)
472 -       return NULL;
473 -    if (ctx->av != NULL)
474 -       ctx->av = argvFree(ctx->av);
475 -    ctx->modes = _free(ctx->modes);
476 -    ctx->sizes = _free(ctx->sizes);
477 -    ctx->mtimes = _free(ctx->mtimes);
478 -    ctx->u = urlFree(ctx->u, __FUNCTION__);
479 -    ctx->uri = _free(ctx->uri);
480 -/*@-boundswrite@*/
481 -    memset(ctx, 0, sizeof(*ctx));
482 -/*@=boundswrite@*/
483 -    ctx = _free(ctx);
484 -    return NULL;
485 -}
486 -
487 -/*@null@*/
488 -static void *fetch_create_context(const char *uri)
489 -       /*@globals internalState @*/
490 -       /*@modifies internalState @*/
491 -{
492 -    struct fetch_context_s * ctx;
493 -    urlinfo u;
494 -
495 -/*@-globs@*/   /* FIX: h_errno annoyance. */
496 -    if (urlSplit(uri, &u))
497 -       return NULL;
498 -/*@=globs@*/
499 -
500 -    ctx = ne_calloc(sizeof(*ctx));
501 -    ctx->uri = xstrdup(uri);
502 -    ctx->u = urlLink(u, __FUNCTION__);
503 -    return ctx;
504 -}
505 -
506 -/*@unchecked@*/ /*@observer@*/
507 -static const ne_propname fetch_props[] = {
508 -    { "DAV:", "getcontentlength" },
509 -    { "DAV:", "getlastmodified" },
510 -    { "http://apache.org/dav/props/", "executable" },
511 -    { "DAV:", "resourcetype" },
512 -    { "DAV:", "checked-in" },
513 -    { "DAV:", "checked-out" },
514 -    { NULL, NULL }
515 -};
516 -
517 -#define ELM_resourcetype (NE_PROPS_STATE_TOP + 1)
518 -#define ELM_collection (NE_PROPS_STATE_TOP + 2)
519 -
520 -/*@unchecked@*/ /*@observer@*/
521 -static const struct ne_xml_idmap fetch_idmap[] = {
522 -    { "DAV:", "resourcetype", ELM_resourcetype },
523 -    { "DAV:", "collection", ELM_collection }
524 -};
525 -
526 -static int fetch_startelm(void *userdata, int parent,
527 -               const char *nspace, const char *name,
528 -               /*@unused@*/ const char **atts)
529 -       /*@*/
530 -{
531 -    ne_propfind_handler *pfh = userdata;
532 -    struct fetch_resource_s *r = ne_propfind_current_private(pfh);
533 -    int state = ne_xml_mapid(fetch_idmap, NE_XML_MAPLEN(fetch_idmap),
534 -                             nspace, name);
535 -
536 -    if (r == NULL ||
537 -        !((parent == NE_207_STATE_PROP && state == ELM_resourcetype) ||
538 -          (parent == ELM_resourcetype && state == ELM_collection)))
539 -        return NE_XML_DECLINE;
540 -
541 -    if (state == ELM_collection) {
542 -       r->type = resr_collection;
543 -    }
544 -
545 -    return state;
546 -}
547 -
548 -static int fetch_compare(const struct fetch_resource_s *r1,
549 -                           const struct fetch_resource_s *r2)
550 -       /*@*/
551 -{
552 -    /* Sort errors first, then collections, then alphabetically */
553 -    if (r1->type == resr_error) {
554 -       return -1;
555 -    } else if (r2->type == resr_error) {
556 -       return 1;
557 -    } else if (r1->type == resr_collection) {
558 -       if (r2->type != resr_collection) {
559 -           return -1;
560 -       } else {
561 -           return strcmp(r1->uri, r2->uri);
562 -       }
563 -    } else {
564 -       if (r2->type != resr_collection) {
565 -           return strcmp(r1->uri, r2->uri);
566 -       } else {
567 -           return 1;
568 -       }
569 -    }
570 -}
571 -
572 -static void fetch_results(void *userdata, void *uarg,
573 -                   const ne_prop_result_set *set)
574 -       /*@*/
575 -{
576 -    struct fetch_context_s *ctx = userdata;
577 -    struct fetch_resource_s *current, *previous, *newres;
578 -    const char *clength, *modtime, *isexec;
579 -    const char *checkin, *checkout;
580 -    const ne_status *status = NULL;
581 -    const char * path = NULL;
582 -
583 -#if !defined(NE_FREE)
584 -    const ne_uri * uri = uarg;
585 -    (void) urlPath(uri->path, &path);
586 -#else
587 -    const char * uri = uarg;
588 -    (void) urlPath(uri, &path);
589 -#endif
590 -    if (path == NULL)
591 -       return;
592 -
593 -    newres = ne_propset_private(set);
594 -
595 -if (_dav_debug < 0)
596 -fprintf(stderr, "==> %s in uri %s\n", path, ctx->uri);
597 -
598 -    if (ne_path_compare(ctx->uri, path) == 0 && !ctx->include_target) {
599 -       /* This is the target URI */
600 -if (_dav_debug < 0)
601 -fprintf(stderr, "==> %s skipping target resource.\n", path);
602 -       /* Free the private structure. */
603 -/*@-dependenttrans -exposetrans@*/
604 -       free(newres);
605 -/*@=dependenttrans =exposetrans@*/
606 -       return;
607 -    }
608 -
609 -    newres->uri = ne_strdup(path);
610 -
611 -/*@-boundsread@*/
612 -    clength = ne_propset_value(set, &fetch_props[0]);
613 -    modtime = ne_propset_value(set, &fetch_props[1]);
614 -    isexec = ne_propset_value(set, &fetch_props[2]);
615 -    checkin = ne_propset_value(set, &fetch_props[4]);
616 -    checkout = ne_propset_value(set, &fetch_props[5]);
617 -/*@=boundsread@*/
618 -
619 -/*@-branchstate@*/
620 -    if (clength == NULL)
621 -       status = ne_propset_status(set, &fetch_props[0]);
622 -    if (modtime == NULL)
623 -       status = ne_propset_status(set, &fetch_props[1]);
624 -/*@=branchstate@*/
625 -
626 -    if (newres->type == resr_normal && status != NULL) {
627 -       /* It's an error! */
628 -       newres->error_status = status->code;
629 -
630 -       /* Special hack for Apache 1.3/mod_dav */
631 -       if (strcmp(status->reason_phrase, "status text goes here") == 0) {
632 -           const char *desc;
633 -           if (status->code == 401) {
634 -               desc = _("Authorization Required");
635 -           } else if (status->klass == 3) {
636 -               desc = _("Redirect");
637 -           } else if (status->klass == 5) {
638 -               desc = _("Server Error");
639 -           } else {
640 -               desc = _("Unknown Error");
641 -           }
642 -           newres->error_reason = ne_strdup(desc);
643 -       } else {
644 -           newres->error_reason = ne_strdup(status->reason_phrase);
645 -       }
646 -       newres->type = resr_error;
647 -    }
648 -
649 -    if (isexec && strcasecmp(isexec, "T") == 0) {
650 -       newres->is_executable = 1;
651 -    } else {
652 -       newres->is_executable = 0;
653 -    }
654 -
655 -    if (modtime)
656 -       newres->modtime = ne_httpdate_parse(modtime);
657 -
658 -    if (clength)
659 -       newres->size = atoi(clength);
660 -
661 -    /* is vcr */
662 -    if (checkin) {
663 -       newres->is_vcr = 1;
664 -    } else if (checkout) {
665 -       newres->is_vcr = 2;
666 -    } else {
667 -       newres->is_vcr = 0;
668 -    }
669 -
670 -    for (current = *ctx->resrock, previous = NULL; current != NULL;
671 -       previous = current, current = current->next)
672 -    {
673 -       if (fetch_compare(current, newres) >= 0) {
674 -           break;
675 -       }
676 -    }
677 -    if (previous) {
678 -       previous->next = newres;
679 -    } else {
680 -/*@-boundswrite -dependenttrans @*/
681 -       *ctx->resrock = newres;
682 -/*@=boundswrite =dependenttrans @*/
683 -    }
684 -    newres->next = current;
685 -}
686 -
687 -static int davFetch(const urlinfo u, struct fetch_context_s * ctx)
688 -       /*@globals internalState @*/
689 -       /*@modifies ctx, internalState @*/
690 -{
691 -    const char * path = NULL;
692 -    int depth = 1;                                     /* XXX passed arg? */
693 -    unsigned int include_target = 0;                   /* XXX passed arg? */
694 -    struct fetch_resource_s * resitem = NULL;
695 -    struct fetch_resource_s ** resrock = &resitem;     /* XXX passed arg? */
696 -    ne_propfind_handler *pfh;
697 -    struct fetch_resource_s *current, *next;
698 -    mode_t st_mode;
699 -    int rc = 0;
700 -    int xx;
701 -
702 -    (void) urlPath(u->url, &path);
703 -    pfh = ne_propfind_create(u->sess, ctx->uri, depth);
704 -
705 -    /* HACK: need to set u->httpHasRange here. */
706 -
707 -    ctx->resrock = resrock;
708 -    ctx->include_target = include_target;
709 -
710 -    ne_xml_push_handler(ne_propfind_get_parser(pfh),
711 -                        fetch_startelm, NULL, NULL, pfh);
712 -
713 -    ne_propfind_set_private(pfh, fetch_create_item, NULL);
714 -
715 -    rc = ne_propfind_named(pfh, fetch_props, fetch_results, ctx);
716 -
717 -    ne_propfind_destroy(pfh);
718 -
719 -    for (current = resitem; current != NULL; current = next) {
720 -       const char *s, *se;
721 -       char * val;
722 -
723 -       next = current->next;
724 -
725 -       /* Collections have trailing '/' that needs trim. */
726 -       /* The top level collection is returned as well. */
727 -       se = current->uri + strlen(current->uri);
728 -       if (se[-1] == '/') {
729 -           if (strlen(current->uri) <= strlen(path)) {
730 -               current = fetch_destroy_item(current);
731 -               continue;
732 -           }
733 -           se--;
734 -       }
735 -       s = se;
736 -       while (s > current->uri && s[-1] != '/')
737 -           s--;
738 -
739 -       val = ne_strndup(s, (se - s));
740 -
741 -/*@-nullpass@*/
742 -       val = ne_path_unescape(val);
743 -/*@=nullpass@*/
744 -
745 -       xx = argvAdd(&ctx->av, val);
746 -if (_dav_debug < 0)
747 -fprintf(stderr, "*** argvAdd(%p,\"%s\")\n", &ctx->av, val);
748 -       ne_free(val);
749 -
750 -       while (ctx->ac >= ctx->nalloced) {
751 -           if (ctx->nalloced <= 0)
752 -               ctx->nalloced = 1;
753 -           ctx->nalloced *= 2;
754 -           ctx->modes = xrealloc(ctx->modes,
755 -                               (sizeof(*ctx->modes) * ctx->nalloced));
756 -           ctx->sizes = xrealloc(ctx->sizes,
757 -                               (sizeof(*ctx->sizes) * ctx->nalloced));
758 -           ctx->mtimes = xrealloc(ctx->mtimes,
759 -                               (sizeof(*ctx->mtimes) * ctx->nalloced));
760 -       }
761 -
762 -       switch (current->type) {
763 -       case resr_normal:
764 -           st_mode = S_IFREG;
765 -           /*@switchbreak@*/ break;
766 -       case resr_collection:
767 -           st_mode = S_IFDIR;
768 -           /*@switchbreak@*/ break;
769 -       case resr_reference:
770 -       case resr_error:
771 -       default:
772 -           st_mode = 0;
773 -           /*@switchbreak@*/ break;
774 -       }
775 -/*@-boundswrite@*/
776 -       ctx->modes[ctx->ac] = st_mode;
777 -       ctx->sizes[ctx->ac] = current->size;
778 -       ctx->mtimes[ctx->ac] = current->modtime;
779 -/*@=boundswrite@*/
780 -       ctx->ac++;
781 -
782 -       current = fetch_destroy_item(current);
783 -    }
784 -    ctx->resrock = NULL;       /* HACK: avoid leaving stack reference. */
785 -
786 -    return rc;
787 -}
788 -
789 -static int davNLST(struct fetch_context_s * ctx)
790 -       /*@globals internalState @*/
791 -       /*@modifies ctx, internalState @*/
792 -{
793 -    urlinfo u = NULL;
794 -    int rc;
795 -    int xx;
796 -
797 -    rc = davInit(ctx->uri, &u);
798 -    if (rc || u == NULL)
799 -       goto exit;
800 -
801 -    rc = davFetch(u, ctx);
802 -    switch (rc) {
803 -    case NE_OK:
804 -        break;
805 -    case NE_ERROR:
806 -       /* HACK: "301 Moved Permanently" on empty subdir. */
807 -       if (!strncmp("301 ", ne_get_error(u->sess), sizeof("301 ")-1))
808 -           break;
809 -       /*@fallthrough@*/
810 -    default:
811 -if (_dav_debug)
812 -fprintf(stderr, "*** Fetch from %s:%d failed:\n\t%s\n",
813 -                  u->host, u->port, ne_get_error(u->sess));
814 -        break;
815 -    }
816 -
817 -exit:
818 -    if (rc)
819 -       xx = davFree(u);
820 -    return rc;
821 -}
822 -
823 -/* =============================================================== */
824 -static int my_result(const char * msg, int ret, /*@null@*/ FILE * fp)
825 -       /*@modifies *fp @*/
826 -{
827 -    /* HACK: don't print unless debugging. */
828 -    if (_dav_debug >= 0)
829 -       return ret;
830 -    if (fp == NULL)
831 -       fp = stderr;
832 -    if (msg != NULL)
833 -       fprintf(fp, "*** %s: ", msg);
834 -
835 -    /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */
836 -#ifdef HACK
837 -    fprintf(fp, "%s: %s\n", ftpStrerror(-ret), ne_get_error(sess));
838 -#else
839 -    fprintf(fp, "%s\n", ftpStrerror(-ret));
840 -#endif
841 -    return ret;
842 -}
843 -
844 -#ifdef DYING
845 -static void hexdump(const unsigned char * buf, ssize_t len)
846 -       /*@*/
847 -{
848 -    int i;
849 -    if (len <= 0)
850 -       return;
851 -    for (i = 0; i < len; i++) {
852 -       if (i != 0 && (i%16) == 0)
853 -           fprintf(stderr, "\n");
854 -       fprintf(stderr, " %02X", buf[i]);
855 -    }
856 -    fprintf(stderr, "\n");
857 -}
858 -#endif
859 -
860 -/*@-mustmod@*/
861 -static void davAcceptRanges(void * userdata, /*@null@*/ const char * value)
862 -       /*@modifies userdata @*/
863 -{
864 -    urlinfo u = userdata;
865 -
866 -    if (!(u != NULL && value != NULL)) return;
867 -if (_dav_debug < 0)
868 -fprintf(stderr, "*** u %p Accept-Ranges: %s\n", u, value);
869 -    if (!strcmp(value, "bytes"))
870 -       u->httpHasRange = 1;
871 -    if (!strcmp(value, "none"))
872 -       u->httpHasRange = 0;
873 -}
874 -/*@=mustmod@*/
875 -
876 -#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
877 -static void davAllHeaders(void * userdata, const char * value)
878 -{
879 -    FD_t ctrl = userdata;
880 -
881 -    if (!(ctrl != NULL && value != NULL)) return;
882 -if (_dav_debug)
883 -fprintf(stderr, "<- %s\n", value);
884 -}
885 -#endif
886 -
887 -/*@-mustmod@*/
888 -static void davContentLength(void * userdata, /*@null@*/ const char * value)
889 -       /*@modifies userdata @*/
890 -{
891 -    FD_t ctrl = userdata;
892 -
893 -    if (!(ctrl != NULL && value != NULL)) return;
894 -if (_dav_debug < 0)
895 -fprintf(stderr, "*** fd %p Content-Length: %s\n", ctrl, value);
896 -/*@-unrecog@*/
897 -   ctrl->contentLength = strtoll(value, NULL, 10);
898 -/*@=unrecog@*/
899 -}
900 -/*@=mustmod@*/
901 -
902 -/*@-mustmod@*/
903 -static void davConnection(void * userdata, /*@null@*/ const char * value)
904 -       /*@modifies userdata @*/
905 -{
906 -    FD_t ctrl = userdata;
907 -
908 -    if (!(ctrl != NULL && value != NULL)) return;
909 -if (_dav_debug < 0)
910 -fprintf(stderr, "*** fd %p Connection: %s\n", ctrl, value);
911 -    if (!strcasecmp(value, "close"))
912 -       ctrl->persist = 0;
913 -    else if (!strcasecmp(value, "Keep-Alive"))
914 -       ctrl->persist = 1;
915 -}
916 -/*@=mustmod@*/
917 -
918 -/*@-mustmod@*/ /* HACK: stash error in *str. */
919 -int davResp(urlinfo u, FD_t ctrl, /*@unused@*/ char *const * str)
920 -{
921 -    int rc = 0;
922 -
923 -    rc = ne_begin_request(ctrl->req);
924 -    rc = my_result("ne_begin_req(ctrl->req)", rc, NULL);
925 -
926 -if (_dav_debug < 0)
927 -fprintf(stderr, "*** davResp(%p,%p,%p) sess %p req %p rc %d\n", u, ctrl, str, u->sess, ctrl->req, rc);
928 -
929 -    /* HACK FTPERR_NE_FOO == -NE_FOO error impedance match */
930 -/*@-observertrans@*/
931 -    if (rc)
932 -       fdSetSyserrno(ctrl, errno, ftpStrerror(-rc));
933 -/*@=observertrans@*/
934 -
935 -    return rc;
936 -}
937 -/*@=mustmod@*/
938 -
939 -int davReq(FD_t ctrl, const char * httpCmd, const char * httpArg)
940 -{
941 -    urlinfo u;
942 -    int rc = 0;
943 -
944 -assert(ctrl != NULL);
945 -    u = ctrl->url;
946 -    URLSANE(u);
947 -
948 -if (_dav_debug < 0)
949 -fprintf(stderr, "*** davReq(%p,%s,\"%s\") entry sess %p req %p\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req);
950 -
951 -    ctrl->persist = (u->httpVersion > 0 ? 1 : 0);
952 -    ctrl = fdLink(ctrl, "open ctrl (davReq)");
953 -
954 -assert(u->sess != NULL);
955 -assert(ctrl->req == NULL);
956 -/*@-nullpass@*/
957 -    ctrl->req = ne_request_create(u->sess, httpCmd, httpArg);
958 -/*@=nullpass@*/
959 -assert(ctrl->req != NULL);
960 -
961 -    ne_set_request_private(ctrl->req, "fd", ctrl);
962 -
963 -#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
964 -    ne_add_response_header_catcher(ctrl->req, davAllHeaders, ctrl);
965 -
966 -    ne_add_response_header_handler(ctrl->req, "Content-Length",
967 -               davContentLength, ctrl);
968 -    ne_add_response_header_handler(ctrl->req, "Connection",
969 -               davConnection, ctrl);
970 -#endif
971 -
972 -    if (!strcmp(httpCmd, "PUT")) {
973 -#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK)
974 -       ctrl->wr_chunked = 1;
975 -       ne_add_request_header(ctrl->req, "Transfer-Encoding", "chunked");
976 -       ne_set_request_chunked(ctrl->req, 1);
977 -       /* HACK: no retries if/when chunking. */
978 -       rc = davResp(u, ctrl, NULL);
979 -#else
980 -       rc = FTPERR_SERVER_IO_ERROR;
981 -#endif
982 -    } else {
983 -       /* HACK: possible Last-Modified: Tue, 02 Nov 2004 14:29:36 GMT */
984 -       /* HACK: possible ETag: "inode-size-mtime" */
985 -#if !defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
986 -       ne_add_response_header_handler(ctrl->req, "Accept-Ranges",
987 -                       davAcceptRanges, u);
988 -#endif
989 -       /* HACK: possible Transfer-Encoding: on GET. */
990 -
991 -       /* HACK: other errors may need retry too. */
992 -       /* HACK: neon retries once, gud enuf. */
993 -       /* HACK: retry counter? */
994 -       do {
995 -           rc = davResp(u, ctrl, NULL);
996 -       } while (rc == NE_RETRY);
997 -    }
998 -    if (rc)
999 -       goto errxit;
1000 -
1001 -if (_dav_debug < 0)
1002 -fprintf(stderr, "*** davReq(%p,%s,\"%s\") exit sess %p req %p rc %d\n", ctrl, httpCmd, (httpArg ? httpArg : ""), u->sess, ctrl->req, rc);
1003 -
1004 -#if defined(HAVE_NEON_NE_GET_RESPONSE_HEADER)
1005 -    davContentLength(ctrl,
1006 -               ne_get_response_header(ctrl->req, "Content-Length"));
1007 -    davConnection(ctrl,
1008 -               ne_get_response_header(ctrl->req, "Connection"));
1009 -    if (strcmp(httpCmd, "PUT"))
1010 -       davAcceptRanges(u,
1011 -               ne_get_response_header(ctrl->req, "Accept-Ranges"));
1012 -#endif
1013 -
1014 -    ctrl = fdLink(ctrl, "open data (davReq)");
1015 -    return 0;
1016 -
1017 -errxit:
1018 -/*@-observertrans@*/
1019 -    fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
1020 -/*@=observertrans@*/
1021 -
1022 -    /* HACK balance fd refs. ne_session_destroy to tear down non-keepalive? */
1023 -    ctrl = fdLink(ctrl, "error data (davReq)");
1024 -
1025 -    return rc;
1026 -}
1027 -
1028 -FD_t davOpen(const char * url, /*@unused@*/ int flags,
1029 -               /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
1030 -{
1031 -    const char * path = NULL;
1032 -    urltype urlType = urlPath(url, &path);
1033 -    urlinfo u = NULL;
1034 -    FD_t fd = NULL;
1035 -    int rc;
1036 -
1037 -#if 0  /* XXX makeTempFile() heartburn */
1038 -    assert(!(flags & O_RDWR));
1039 -#endif
1040 -
1041 -if (_dav_debug < 0)
1042 -fprintf(stderr, "*** davOpen(%s,0x%x,0%o,%p)\n", url, flags, mode, uret);
1043 -    rc = davInit(url, &u);
1044 -    if (rc || u == NULL || u->sess == NULL)
1045 -       goto exit;
1046 -
1047 -    if (u->ctrl == NULL)
1048 -       u->ctrl = fdNew("persist ctrl (davOpen)");
1049 -    if (u->ctrl->nrefs > 2 && u->data == NULL)
1050 -       u->data = fdNew("persist data (davOpen)");
1051 -
1052 -    if (u->ctrl->url == NULL)
1053 -       fd = fdLink(u->ctrl, "grab ctrl (davOpen persist ctrl)");
1054 -    else if (u->data->url == NULL)
1055 -       fd = fdLink(u->data, "grab ctrl (davOpen persist data)");
1056 -    else
1057 -       fd = fdNew("grab ctrl (davOpen)");
1058 -
1059 -    if (fd) {
1060 -       fdSetOpen(fd, url, flags, mode);
1061 -       fdSetIo(fd, ufdio);
1062 -
1063 -       fd->ftpFileDoneNeeded = 0;
1064 -       fd->rd_timeoutsecs = httpTimeoutSecs;
1065 -       fd->contentLength = fd->bytesRemain = -1;
1066 -       fd->url = urlLink(u, "url (davOpen)");
1067 -       fd = fdLink(fd, "grab data (davOpen)");
1068 -assert(urlType == URL_IS_HTTPS || urlType == URL_IS_HTTP || urlType == URL_IS_HKP);
1069 -       fd->urlType = urlType;
1070 -    }
1071 -
1072 -exit:
1073 -/*@-boundswrite@*/
1074 -    if (uret)
1075 -       *uret = u;
1076 -/*@=boundswrite@*/
1077 -    /*@-refcounttrans@*/
1078 -    return fd;
1079 -    /*@=refcounttrans@*/
1080 -}
1081 -
1082 -ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
1083 -{
1084 -    FD_t fd = cookie;
1085 -    ssize_t rc;
1086 -
1087 -#if 0
1088 -assert(count >= 128);  /* HACK: see ne_request.h comment */
1089 -#endif
1090 -    rc = ne_read_response_block(fd->req, buf, count);
1091 -
1092 -if (_dav_debug < 0) {
1093 -fprintf(stderr, "*** davRead(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
1094 -#ifdef DYING
1095 -hexdump(buf, rc);
1096 -#endif
1097 -    }
1098 -
1099 -    return rc;
1100 -}
1101 -
1102 -ssize_t davWrite(void * cookie, const char * buf, size_t count)
1103 -{
1104 -    FD_t fd = cookie;
1105 -    ssize_t rc;
1106 -    int xx;
1107 -
1108 -#if !defined(NEONBLOWSCHUNKS)
1109 -    ne_session * sess;
1110 -
1111 -assert(fd->req != NULL);
1112 -    sess = ne_get_session(fd->req);
1113 -assert(sess != NULL);
1114 -
1115 -    /* HACK: include ne_private.h to access sess->socket for now. */
1116 -    xx = ne_sock_fullwrite(sess->socket, buf, count);
1117 -#else
1118 -#if defined(HAVE_NEON_NE_SEND_REQUEST_CHUNK) || defined(__LCLINT__)
1119 -assert(fd->req != NULL);
1120 -    xx = ne_send_request_chunk(fd->req, buf, count);
1121 -#else
1122 -    errno = EIO;       /* HACK */
1123 -    return -1;
1124 -#endif
1125 -#endif
1126 -
1127 -    /* HACK: stupid error impedence matching. */
1128 -    rc = (xx == 0 ? count : -1);
1129 -
1130 -if (_dav_debug < 0)
1131 -fprintf(stderr, "*** davWrite(%p,%p,0x%x) rc 0x%x\n", cookie, buf, (unsigned)count, (unsigned)rc);
1132 -#ifdef DYING
1133 -if (count > 0)
1134 -hexdump(buf, count);
1135 -#endif
1136 -
1137 -    return rc;
1138 -}
1139 -
1140 -int davSeek(void * cookie, /*@unused@*/ _libio_pos_t pos, int whence)
1141 -{
1142 -if (_dav_debug < 0)
1143 -fprintf(stderr, "*** davSeek(%p,pos,%d)\n", cookie, whence);
1144 -    return -1;
1145 -}
1146 -
1147 -/*@-mustmod@*/ /* HACK: fd->req is modified. */
1148 -int davClose(void * cookie)
1149 -{
1150 -/*@-onlytrans@*/
1151 -    FD_t fd = cookie;
1152 -/*@=onlytrans@*/
1153 -    int rc;
1154 -
1155 -assert(fd->req != NULL);
1156 -    rc = ne_end_request(fd->req);
1157 -    rc = my_result("ne_end_request(req)", rc, NULL);
1158 -
1159 -    ne_request_destroy(fd->req);
1160 -    fd->req = NULL;
1161 -
1162 -if (_dav_debug < 0)
1163 -fprintf(stderr, "*** davClose(%p) rc %d\n", fd, rc);
1164 -    return rc;
1165 -}
1166 -/*@=mustmod@*/
1167 -
1168 -/* =============================================================== */
1169 -int davMkdir(const char * path, mode_t mode)
1170 -{
1171 -    urlinfo u = NULL;
1172 -    const char * src = NULL;
1173 -    int rc;
1174 -
1175 -    rc = davInit(path, &u);
1176 -    if (rc)
1177 -       goto exit;
1178 -
1179 -    (void) urlPath(path, &src);
1180 -
1181 -    rc = ne_mkcol(u->sess, path);
1182 -
1183 -    if (rc) rc = -1;   /* XXX HACK: errno impedance match */
1184 -
1185 -    /* XXX HACK: verify getrestype(remote) == resr_collection */
1186 -
1187 -exit:
1188 -if (_dav_debug)
1189 -fprintf(stderr, "*** davMkdir(%s,0%o) rc %d\n", path, mode, rc);
1190 -    return rc;
1191 -}
1192 -
1193 -int davRmdir(const char * path)
1194 -{
1195 -    urlinfo u = NULL;
1196 -    const char * src = NULL;
1197 -    int rc;
1198 -
1199 -    rc = davInit(path, &u);
1200 -    if (rc)
1201 -       goto exit;
1202 -
1203 -    (void) urlPath(path, &src);
1204 -
1205 -    /* XXX HACK: only getrestype(remote) == resr_collection */
1206 -
1207 -    rc = ne_delete(u->sess, path);
1208 -
1209 -    if (rc) rc = -1;   /* XXX HACK: errno impedance match */
1210 -
1211 -exit:
1212 -if (_dav_debug)
1213 -fprintf(stderr, "*** davRmdir(%s) rc %d\n", path, rc);
1214 -    return rc;
1215 -}
1216 -
1217 -int davRename(const char * oldpath, const char * newpath)
1218 -{
1219 -    urlinfo u = NULL;
1220 -    const char * src = NULL;
1221 -    const char * dst = NULL;
1222 -    int overwrite = 1;         /* HACK: set this correctly. */
1223 -    int rc;
1224 -
1225 -    rc = davInit(oldpath, &u);
1226 -    if (rc)
1227 -       goto exit;
1228 -
1229 -    (void) urlPath(oldpath, &src);
1230 -    (void) urlPath(newpath, &dst);
1231 -
1232 -    /* XXX HACK: only getrestype(remote) != resr_collection */
1233 -
1234 -    rc = ne_move(u->sess, overwrite, src, dst);
1235 -
1236 -    if (rc) rc = -1;   /* XXX HACK: errno impedance match */
1237 -
1238 -exit:
1239 -if (_dav_debug)
1240 -fprintf(stderr, "*** davRename(%s,%s) rc %d\n", oldpath, newpath, rc);
1241 -    return rc;
1242 -}
1243 -
1244 -int davUnlink(const char * path)
1245 -{
1246 -    urlinfo u = NULL;
1247 -    const char * src = NULL;
1248 -    int rc;
1249 -
1250 -    rc = davInit(path, &u);
1251 -    if (rc)
1252 -       goto exit;
1253 -
1254 -    (void) urlPath(path, &src);
1255 -
1256 -    /* XXX HACK: only getrestype(remote) != resr_collection */
1257 -
1258 -    rc = ne_delete(u->sess, src);
1259 -
1260 -exit:
1261 -    if (rc) rc = -1;   /* XXX HACK: errno impedance match */
1262 -
1263 -if (_dav_debug)
1264 -fprintf(stderr, "*** davUnlink(%s) rc %d\n", path, rc);
1265 -    return rc;
1266 -}
1267 -
1268 -#ifdef NOTYET
1269 -static int davChdir(const char * path)
1270 -       /*@globals h_errno, fileSystem, internalState @*/
1271 -       /*@modifies fileSystem, internalState @*/
1272 -{
1273 -    return davCommand("CWD", path, NULL);
1274 -}
1275 -#endif /* NOTYET */
1276 -
1277 -/* =============================================================== */
1278 -
1279 -static const char * statstr(const struct stat * st,
1280 -               /*@returned@*/ /*@out@*/ char * buf)
1281 -       /*@modifies *buf @*/
1282 -{
1283 -    sprintf(buf,
1284 -       "*** dev %x ino %x mode %0o nlink %d uid %d gid %d rdev %x size %x\n",
1285 -       (unsigned)st->st_dev,
1286 -       (unsigned)st->st_ino,
1287 -       st->st_mode,
1288 -       (unsigned)st->st_nlink,
1289 -       st->st_uid,
1290 -       st->st_gid,
1291 -       (unsigned)st->st_rdev,
1292 -       (unsigned)st->st_size);
1293 -    return buf;
1294 -}
1295 -
1296 -/*@unchecked@*/
1297 -static int dav_st_ino = 0xdead0000;
1298 -
1299 -/*@-boundswrite@*/
1300 -int davStat(const char * path, /*@out@*/ struct stat *st)
1301 -       /*@globals dav_st_ino, fileSystem, internalState @*/
1302 -       /*@modifies *st, dav_st_ino, fileSystem, internalState @*/
1303 -{
1304 -    struct fetch_context_s * ctx = NULL;
1305 -    char buf[1024];
1306 -    int rc = -1;
1307 -
1308 -/* HACK: neon really wants collections with trailing '/' */
1309 -    ctx = fetch_create_context(path);
1310 -    if (ctx == NULL) {
1311 -/* HACK: errno = ??? */
1312 -       goto exit;
1313 -    }
1314 -    rc = davNLST(ctx);
1315 -    if (rc) {
1316 -/* HACK: errno = ??? */
1317 -       goto exit;
1318 -    }
1319 -
1320 -    memset(st, 0, sizeof(*st));
1321 -    st->st_mode = ctx->modes[0];
1322 -    st->st_size = ctx->sizes[0];
1323 -    st->st_mtime = ctx->mtimes[0];
1324 -    if (S_ISDIR(st->st_mode)) {
1325 -       st->st_nlink = 2;
1326 -       st->st_mode |= 0755;
1327 -    } else
1328 -    if (S_ISREG(st->st_mode)) {
1329 -       st->st_nlink = 1;
1330 -       st->st_mode |= 0644;
1331 -    }
1332 -
1333 -    /* XXX fts(3) needs/uses st_ino, make something up for now. */
1334 -    if (st->st_ino == 0)
1335 -       st->st_ino = dav_st_ino++;
1336 -if (_dav_debug < 0)
1337 -fprintf(stderr, "*** davStat(%s) rc %d\n%s", path, rc, statstr(st, buf));
1338 -exit:
1339 -    ctx = fetch_destroy_context(ctx);
1340 -    return rc;
1341 -}
1342 -/*@=boundswrite@*/
1343 -
1344 -/*@-boundswrite@*/
1345 -int davLstat(const char * path, /*@out@*/ struct stat *st)
1346 -       /*@globals dav_st_ino, fileSystem, internalState @*/
1347 -       /*@modifies *st, dav_st_ino, fileSystem, internalState @*/
1348 -{
1349 -    struct fetch_context_s * ctx = NULL;
1350 -    char buf[1024];
1351 -    int rc = -1;
1352 -
1353 -/* HACK: neon really wants collections with trailing '/' */
1354 -    ctx = fetch_create_context(path);
1355 -    if (ctx == NULL) {
1356 -/* HACK: errno = ??? */
1357 -       goto exit;
1358 -    }
1359 -    rc = davNLST(ctx);
1360 -    if (rc) {
1361 -/* HACK: errno = ??? */
1362 -       goto exit;
1363 -    }
1364 -
1365 -    memset(st, 0, sizeof(*st));
1366 -    st->st_mode = ctx->modes[0];
1367 -    st->st_size = ctx->sizes[0];
1368 -    st->st_mtime = ctx->mtimes[0];
1369 -    if (S_ISDIR(st->st_mode)) {
1370 -       st->st_nlink = 2;
1371 -       st->st_mode |= 0755;
1372 -    } else
1373 -    if (S_ISREG(st->st_mode)) {
1374 -       st->st_nlink = 1;
1375 -       st->st_mode |= 0644;
1376 -    }
1377 -
1378 -    /* XXX fts(3) needs/uses st_ino, make something up for now. */
1379 -    if (st->st_ino == 0)
1380 -       st->st_ino = dav_st_ino++;
1381 -if (_dav_debug < 0)
1382 -fprintf(stderr, "*** davLstat(%s) rc %d\n%s\n", path, rc, statstr(st, buf));
1383 -exit:
1384 -    ctx = fetch_destroy_context(ctx);
1385 -    return rc;
1386 -}
1387 -/*@=boundswrite@*/
1388 -
1389 -#ifdef NOTYET
1390 -static int davReadlink(const char * path, /*@out@*/ char * buf, size_t bufsiz)
1391 -       /*@globals h_errno, fileSystem, internalState @*/
1392 -       /*@modifies *buf, fileSystem, internalState @*/
1393 -{
1394 -    int rc;
1395 -    rc = davNLST(path, DO_FTP_READLINK, NULL, buf, bufsiz);
1396 -if (_dav_debug < 0)
1397 -fprintf(stderr, "*** davReadlink(%s) rc %d\n", path, rc);
1398 -    return rc;
1399 -}
1400 -#endif /* NOTYET */
1401 -
1402 -/* =============================================================== */
1403  /*@unchecked@*/
1404  int avmagicdir = 0x3607113;
1405  
1406 @@ -1518,171 +167,4 @@
1407  }
1408  /*@=boundswrite@*/
1409  
1410 -/* =============================================================== */
1411 -/*@unchecked@*/
1412 -int davmagicdir = 0x8440291;
1413 -
1414 -int davClosedir(/*@only@*/ DIR * dir)
1415 -{
1416 -    DAVDIR avdir = (DAVDIR)dir;
1417 -
1418 -if (_dav_debug < 0)
1419 -fprintf(stderr, "*** davClosedir(%p)\n", avdir);
1420 -
1421 -#if defined(HAVE_PTHREAD_H)
1422 -/*@-moduncon -noeffectuncon @*/
1423 -    (void) pthread_mutex_destroy(&avdir->lock);
1424 -/*@=moduncon =noeffectuncon @*/
1425 -#endif
1426 -
1427 -    avdir = _free(avdir);
1428 -    return 0;
1429 -}
1430 -
1431 -struct dirent * davReaddir(DIR * dir)
1432 -{
1433 -    DAVDIR avdir = (DAVDIR)dir;
1434 -    struct dirent * dp;
1435 -    const char ** av;
1436 -    unsigned char * dt;
1437 -    int ac;
1438 -    int i;
1439 -
1440 -    if (avdir == NULL || !ISDAVMAGIC(avdir) || avdir->data == NULL) {
1441 -       /* XXX TODO: EBADF errno. */
1442 -       return NULL;
1443 -    }
1444 -
1445 -    dp = (struct dirent *) avdir->data;
1446 -    av = (const char **) (dp + 1);
1447 -    ac = avdir->size;
1448 -    dt = (char *) (av + (ac + 1));
1449 -    i = avdir->offset + 1;
1450 -
1451 -/*@-boundsread@*/
1452 -    if (i < 0 || i >= ac || av[i] == NULL)
1453 -       return NULL;
1454 -/*@=boundsread@*/
1455 -
1456 -    avdir->offset = i;
1457 -
1458 -    /* XXX glob(3) uses REAL_DIR_ENTRY(dp) test on d_ino */
1459 -/*@-type@*/
1460 -    dp->d_ino = i + 1;         /* W2DO? */
1461 -    dp->d_reclen = 0;          /* W2DO? */
1462 -
1463 -#if !(defined(hpux) || defined(__hpux) || defined(sun))
1464 -#if !defined(__APPLE__)
1465 -    dp->d_off = 0;             /* W2DO? */
1466 -#endif
1467 -/*@-boundsread@*/
1468 -    dp->d_type = dt[i];
1469 -/*@=boundsread@*/
1470 -#endif
1471 -/*@=type@*/
1472 -
1473 -    strncpy(dp->d_name, av[i], sizeof(dp->d_name));
1474 -if (_dav_debug < 0)
1475 -fprintf(stderr, "*** davReaddir(%p) %p \"%s\"\n", (void *)avdir, dp, dp->d_name);
1476 -
1477 -    return dp;
1478 -}
1479 -
1480 -/*@-boundswrite@*/
1481 -DIR * davOpendir(const char * path)
1482 -{
1483 -    struct fetch_context_s * ctx;
1484 -    DAVDIR avdir;
1485 -    struct dirent * dp;
1486 -    size_t nb;
1487 -    const char ** av, ** nav;
1488 -    unsigned char * dt;
1489 -    char * t;
1490 -    int ac, nac;
1491 -    int rc;
1492  
1493 -    /* HACK: glob does not pass dirs with trailing '/' */
1494 -    nb = strlen(path)+1;
1495 -/*@-branchstate@*/
1496 -    if (path[nb-1] != '/') {
1497 -       char * npath = alloca(nb+1);
1498 -       *npath = '\0';
1499 -       (void) stpcpy( stpcpy(npath, path), "/");
1500 -       path = npath;
1501 -    }
1502 -/*@=branchstate@*/
1503 -
1504 -if (_dav_debug < 0)
1505 -fprintf(stderr, "*** davOpendir(%s)\n", path);
1506 -
1507 -    /* Load DAV collection into argv. */
1508 -    ctx = fetch_create_context(path);
1509 -    if (ctx == NULL) {
1510 -/* HACK: errno = ??? */
1511 -       return NULL;
1512 -    }
1513 -    rc = davNLST(ctx);
1514 -    if (rc) {
1515 -/* HACK: errno = ??? */
1516 -       return NULL;
1517 -    }
1518 -
1519 -    nb = 0;
1520 -    ac = 0;
1521 -    av = ctx->av;
1522 -    if (av != NULL)
1523 -    while (av[ac] != NULL)
1524 -       nb += strlen(av[ac++]) + 1;
1525 -    ac += 2;   /* for "." and ".." */
1526 -    nb += sizeof(".") + sizeof("..");
1527 -
1528 -    nb += sizeof(*avdir) + sizeof(*dp) + ((ac + 1) * sizeof(*av)) + (ac + 1);
1529 -    avdir = xcalloc(1, nb);
1530 -    /*@-abstract@*/
1531 -    dp = (struct dirent *) (avdir + 1);
1532 -    nav = (const char **) (dp + 1);
1533 -    dt = (char *) (nav + (ac + 1));
1534 -    t = (char *) (dt + ac + 1);
1535 -    /*@=abstract@*/
1536 -
1537 -    avdir->fd = davmagicdir;
1538 -/*@-usereleased@*/
1539 -    avdir->data = (char *) dp;
1540 -/*@=usereleased@*/
1541 -    avdir->allocation = nb;
1542 -    avdir->size = ac;
1543 -    avdir->offset = -1;
1544 -    avdir->filepos = 0;
1545 -
1546 -#if defined(HAVE_PTHREAD_H)
1547 -/*@-moduncon -noeffectuncon -nullpass @*/
1548 -    (void) pthread_mutex_init(&avdir->lock, NULL);
1549 -/*@=moduncon =noeffectuncon =nullpass @*/
1550 -#endif
1551 -
1552 -    nac = 0;
1553 -/*@-dependenttrans -unrecog@*/
1554 -    dt[nac] = DT_DIR;  nav[nac++] = t; t = stpcpy(t, ".");     t++;
1555 -    dt[nac] = DT_DIR;  nav[nac++] = t; t = stpcpy(t, "..");    t++;
1556 -/*@=dependenttrans =unrecog@*/
1557 -
1558 -    /* Copy DAV items into DIR elments. */
1559 -    ac = 0;
1560 -    if (av != NULL)
1561 -    while (av[ac] != NULL) {
1562 -       nav[nac] = t;
1563 -       dt[nac] = (S_ISDIR(ctx->modes[ac]) ? DT_DIR : DT_REG);
1564 -       t = stpcpy(t, av[ac]);
1565 -       ac++;
1566 -       t++;
1567 -       nac++;
1568 -    }
1569 -    nav[nac] = NULL;
1570 -
1571 -    ctx = fetch_destroy_context(ctx);
1572 -
1573 -/*@-kepttrans@*/
1574 -    return (DIR *) avdir;
1575 -/*@=kepttrans@*/
1576 -}
1577 -/*@=modfilesys@*/
1578 diff -ur rpm-4.4.7.org/rpmio/rpmdav.h rpm-4.4.7/rpmio/rpmdav.h
1579 --- rpm-4.4.7.org/rpmio/rpmdav.h        2005-10-11 21:13:59.000000000 +0200
1580 +++ rpm-4.4.7/rpmio/rpmdav.h    2006-10-17 22:14:25.659533000 +0200
1581 @@ -80,133 +80,6 @@
1582         /*@globals fileSystem, internalState @*/
1583         /*@modifies fileSystem, internalState @*/;
1584  
1585 -/**
1586 - * Send a http request.
1587 - * @param ctrl         
1588 - * @param httpCmd      http command
1589 - * @param httpArg      http command argument (NULL if none)
1590 - * @returns            0 on success
1591 - */
1592 -int davReq(FD_t ctrl, const char * httpCmd, /*@null@*/ const char * httpArg)
1593 -       /*@globals fileSystem, internalState @*/
1594 -       /*@modifies ctrl, fileSystem, internalState @*/;
1595 -
1596 -/**
1597 - * Read a http response.
1598 - * @param u
1599 - * @param cntl         
1600 - * @retval *str                error msg               
1601 - * @returns            0 on success
1602 - */
1603 -/*@-exportlocal@*/
1604 -int davResp(urlinfo u, FD_t ctrl, /*@out@*/ /*@null@*/ char *const * str)
1605 -       /*@globals fileSystem, internalState @*/
1606 -       /*@modifies ctrl, *str, fileSystem, internalState @*/;
1607 -/*@=exportlocal@*/
1608 -
1609 -/**
1610 - */
1611 -/*@null@*/
1612 -FD_t davOpen(const char * url, /*@unused@*/ int flags,
1613 -               /*@unused@*/ mode_t mode, /*@out@*/ urlinfo * uret)
1614 -        /*@globals internalState @*/
1615 -        /*@modifies *uret, internalState @*/;
1616 -
1617 -/**
1618 - */
1619 -/*@-incondefs@*/
1620 -ssize_t davRead(void * cookie, /*@out@*/ char * buf, size_t count)
1621 -        /*@globals fileSystem, internalState @*/
1622 -        /*@modifies buf, fileSystem, internalState @*/
1623 -       /*@requires maxSet(buf) >= (count - 1) @*/
1624 -       /*@ensures maxRead(buf) == result @*/;
1625 -/*@=incondefs@*/
1626 -
1627 -/**
1628 - */
1629 -ssize_t davWrite(void * cookie, const char * buf, size_t count)
1630 -        /*@globals fileSystem, internalState @*/
1631 -        /*@modifies fileSystem, internalState @*/;
1632 -
1633 -/**
1634 - */
1635 -int davSeek(void * cookie, _libio_pos_t pos, int whence)
1636 -        /*@globals fileSystem, internalState @*/
1637 -        /*@modifies fileSystem, internalState @*/;
1638 -
1639 -/**
1640 - */
1641 -int davClose(void * cookie)
1642 -       /*@globals fileSystem, internalState @*/
1643 -       /*@modifies cookie, fileSystem, internalState @*/;
1644 -
1645 -/**
1646 - */
1647 -int davMkdir(const char * path, mode_t mode)
1648 -       /*@globals fileSystem, internalState @*/
1649 -       /*@modifies fileSystem, internalState @*/;
1650 -
1651 -/**
1652 - */
1653 -int davRmdir(const char * path)
1654 -       /*@globals fileSystem, internalState @*/
1655 -       /*@modifies fileSystem, internalState @*/;
1656 -
1657 -/**
1658 - */
1659 -int davRename(const char * oldpath, const char * newpath)
1660 -       /*@globals fileSystem, internalState @*/
1661 -       /*@modifies fileSystem, internalState @*/;
1662 -
1663 -/**
1664 - */
1665 -int davUnlink(const char * path)
1666 -       /*@globals fileSystem, internalState @*/
1667 -       /*@modifies fileSystem, internalState @*/;
1668 -
1669 -/**
1670 - * Close a DAV collection.
1671 - * @param dir          argv DIR
1672 - * @return             0 always
1673 - */
1674 -int davClosedir(/*@only@*/ DIR * dir)
1675 -       /*@globals fileSystem @*/
1676 -       /*@modifies dir, fileSystem @*/;
1677 -
1678 -/**
1679 - * Return next entry from a DAV collection.
1680 - * @param dir          argv DIR
1681 - * @return             next entry
1682 - */
1683 -/*@dependent@*/ /*@null@*/
1684 -struct dirent * davReaddir(DIR * dir)
1685 -       /*@globals fileSystem @*/
1686 -       /*@modifies fileSystem @*/;
1687 -
1688 -/**
1689 - * Create an argv directory from DAV collection.
1690 - * @param path         URL for DAV collection path
1691 - * @return             argv DIR
1692 - */
1693 -/*@null@*/
1694 -DIR * davOpendir(const char * path)
1695 -       /*@globals fileSystem, internalState @*/
1696 -       /*@modifies fileSystem, internalState @*/;
1697 -
1698 -/**
1699 - * stat(2) clone.
1700 - */
1701 -int davStat(const char * path, /*@out@*/ struct stat * st)
1702 -       /*@globals fileSystem, internalState @*/
1703 -       /*@modifies *st, fileSystem, internalState @*/;
1704 -
1705 -/**
1706 - * lstat(2) clone.
1707 - */
1708 -int davLstat(const char * path, /*@out@*/ struct stat * st)
1709 -       /*@globals fileSystem, internalState @*/
1710 -       /*@modifies *st, fileSystem, internalState @*/;
1711 -
1712  #ifdef __cplusplus
1713  }
1714  #endif
1715 diff -ur rpm-4.4.7.org/rpmio/rpmio.c rpm-4.4.7/rpmio/rpmio.c
1716 --- rpm-4.4.7.org/rpmio/rpmio.c 2006-08-08 08:55:01.000000000 +0200
1717 +++ rpm-4.4.7/rpmio/rpmio.c     2006-10-17 22:18:38.135311750 +0200
1718 @@ -406,13 +406,6 @@
1719  
1720      fdstat_enter(fd, FDSTAT_READ);
1721  /*@-boundswrite@*/
1722 -    /* HACK: flimsy wiring for davRead */
1723 -    if (fd->req != NULL) {
1724 -       rc = davRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
1725 -       /* XXX Chunked davRead EOF. */
1726 -       if (rc == 0)
1727 -           fd->bytesRemain = 0;
1728 -    } else
1729         rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
1730  /*@=boundswrite@*/
1731      fdstat_exit(fd, FDSTAT_READ, rc);
1732 @@ -440,10 +433,6 @@
1733  
1734      fdstat_enter(fd, FDSTAT_WRITE);
1735  /*@-boundsread@*/
1736 -    /* HACK: flimsy wiring for davWrite */
1737 -    if (fd->req != NULL)
1738 -       rc = davWrite(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
1739 -    else
1740         rc = write(fdno, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
1741  /*@=boundsread@*/
1742      fdstat_exit(fd, FDSTAT_WRITE, rc);
1743 @@ -490,11 +479,6 @@
1744      fdSetFdno(fd, -1);
1745  
1746      fdstat_enter(fd, FDSTAT_CLOSE);
1747 -    /* HACK: flimsy wiring for davClose */
1748 -/*@-branchstate@*/
1749 -    if (fd->req != NULL)
1750 -       rc = davClose(fd);
1751 -    else
1752         rc = ((fdno >= 0) ? close(fdno) : -2);
1753  /*@=branchstate@*/
1754      fdstat_exit(fd, FDSTAT_CLOSE, rc);
1755 @@ -547,10 +531,6 @@
1756      FD_ZERO(&wrfds);
1757  #endif
1758         
1759 -    /* HACK: flimsy wiring for davWrite */
1760 -    if (fd->req != NULL)
1761 -       return 1;
1762 -
1763      if ((fdno = fdFileno(fd)) < 0)
1764         return -1;      /* XXX W2DO? */
1765         
1766 @@ -602,10 +582,6 @@
1767      FD_ZERO(&rdfds);
1768  #endif
1769  
1770 -    /* HACK: flimsy wiring for davRead */
1771 -    if (fd->req != NULL)
1772 -       return 1;
1773 -
1774      if ((fdno = fdFileno(fd)) < 0)
1775         return -1;      /* XXX W2DO? */
1776         
1777 @@ -1758,159 +1734,6 @@
1778      return rc;
1779  }
1780  
1781 -#ifdef DEAD
1782 -static int httpResp(urlinfo u, FD_t ctrl, /*@out@*/ char ** str)
1783 -       /*@globals fileSystem @*/
1784 -       /*@modifies ctrl, *str, fileSystem @*/
1785 -{
1786 -    int ec = 0;
1787 -    int rc;
1788 -
1789 -    URLSANE(u);
1790 -    rc = checkResponse(u, ctrl, &ec, str);
1791 -
1792 -if (_ftp_debug && !(rc == 0 && (ec == 200 || ec == 201)))
1793 -fprintf(stderr, "*** httpResp: rc %d ec %d\n", rc, ec);
1794 -
1795 -    switch (ec) {
1796 -    case 200:
1797 -    case 201:                  /* 201 Created. */
1798 -       break;
1799 -    case 204:                  /* HACK: if overwriting, 204 No Content. */
1800 -    case 403:                  /* 403 Forbidden. */
1801 -       ctrl->syserrno = EACCES;        /* HACK */
1802 -       rc = FTPERR_UNKNOWN;
1803 -       break;
1804 -    default:
1805 -       rc = FTPERR_FILE_NOT_FOUND;
1806 -       break;
1807 -    }
1808 -    return rc;
1809 -}
1810 -
1811 -static int httpReq(FD_t ctrl, const char * httpCmd, const char * httpArg)
1812 -       /*@globals h_errno, fileSystem, internalState @*/
1813 -       /*@modifies ctrl, fileSystem, internalState @*/
1814 -{
1815 -    urlinfo u;
1816 -    const char * host;
1817 -    const char * path;
1818 -    char hthost[NI_MAXHOST];
1819 -    int port;
1820 -    int rc;
1821 -    char * req;
1822 -    size_t len;
1823 -    int retrying = 0;
1824 -
1825 -assert(ctrl != NULL);
1826 -    u = ctrl->url;
1827 -    URLSANE(u);
1828 -
1829 -    if (((host = (u->proxyh ? u->proxyh : u->host)) == NULL))
1830 -       return FTPERR_BAD_HOSTNAME;
1831 -    if (strchr(host, ':'))
1832 -       sprintf(hthost, "[%s]", host);
1833 -    else
1834 -       strcpy(hthost, host);
1835 -
1836 -    if ((port = (u->proxyp > 0 ? u->proxyp : u->port)) < 0) port = 80;
1837 -    path = (u->proxyh || u->proxyp > 0) ? u->url : httpArg;
1838 -    /*@-branchstate@*/
1839 -    if (path == NULL) path = "";
1840 -    /*@=branchstate@*/
1841 -
1842 -reopen:
1843 -    /*@-branchstate@*/
1844 -    if (fdFileno(ctrl) >= 0 && (rc = fdWritable(ctrl, 0)) < 1) {
1845 -       /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
1846 -    }
1847 -    /*@=branchstate@*/
1848 -
1849 -/*@-usereleased@*/
1850 -    if (fdFileno(ctrl) < 0) {
1851 -       rc = tcpConnect(ctrl, host, port);
1852 -       if (rc < 0)
1853 -           goto errxit2;
1854 -       ctrl = fdLink(ctrl, "open ctrl (httpReq)");
1855 -    }
1856 -
1857 -    len = sizeof("\
1858 -req x HTTP/1.0\r\n\
1859 -User-Agent: rpm/3.0.4\r\n\
1860 -Host: y:z\r\n\
1861 -Accept: text/plain\r\n\
1862 -Transfer-Encoding: chunked\r\n\
1863 -\r\n\
1864 -") + strlen(httpCmd) + strlen(path) + sizeof(VERSION) + strlen(hthost) + 20;
1865 -
1866 -/*@-boundswrite@*/
1867 -    req = alloca(len);
1868 -    *req = '\0';
1869 -
1870 -  if (!strcmp(httpCmd, "PUT")) {
1871 -    sprintf(req, "\
1872 -%s %s HTTP/1.%d\r\n\
1873 -User-Agent: rpm/%s\r\n\
1874 -Host: %s:%d\r\n\
1875 -Accept: text/plain\r\n\
1876 -Transfer-Encoding: chunked\r\n\
1877 -\r\n\
1878 -",     httpCmd, path, (u->httpVersion ? 1 : 0), VERSION, hthost, port);
1879 -} else {
1880 -    sprintf(req, "\
1881 -%s %s HTTP/1.%d\r\n\
1882 -User-Agent: rpm/%s\r\n\
1883 -Host: %s:%d\r\n\
1884 -Accept: text/plain\r\n\
1885 -\r\n\
1886 -",     httpCmd, path, (u->httpVersion ? 1 : 0), VERSION, hthost, port);
1887 -}
1888 -/*@=boundswrite@*/
1889 -
1890 -if (_ftp_debug)
1891 -fprintf(stderr, "-> %s", req);
1892 -
1893 -    len = strlen(req);
1894 -    if (fdWrite(ctrl, req, len) != len) {
1895 -       rc = FTPERR_SERVER_IO_ERROR;
1896 -       goto errxit;
1897 -    }
1898 -
1899 -    /*@-branchstate@*/
1900 -    if (!strcmp(httpCmd, "PUT")) {
1901 -       ctrl->wr_chunked = 1;
1902 -    } else {
1903 -
1904 -       rc = httpResp(u, ctrl, NULL);
1905 -
1906 -       if (rc) {
1907 -           if (!retrying) {    /* not HTTP_OK */
1908 -               retrying = 1;
1909 -               /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
1910 -               goto reopen;
1911 -           }
1912 -           goto errxit;
1913 -       }
1914 -    }
1915 -    /*@=branchstate@*/
1916 -
1917 -    ctrl = fdLink(ctrl, "open data (httpReq)");
1918 -    return 0;
1919 -
1920 -errxit:
1921 -    /*@-observertrans@*/
1922 -    fdSetSyserrno(ctrl, errno, ftpStrerror(rc));
1923 -    /*@=observertrans@*/
1924 -errxit2:
1925 -    /*@-branchstate@*/
1926 -    if (fdFileno(ctrl) >= 0)
1927 -       /*@-refcounttrans@*/ (void) fdClose(ctrl); /*@=refcounttrans@*/
1928 -    /*@=branchstate@*/
1929 -    return rc;
1930 -/*@=usereleased@*/
1931 -}
1932 -#endif
1933 -
1934  /* XXX DYING: unused */
1935  void * ufdGetUrlinfo(FD_t fd)
1936  {
1937 @@ -2268,29 +2091,6 @@
1938             fd->wr_chunked = 0;
1939         }
1940         break;
1941 -    case URL_IS_HTTPS:
1942 -    case URL_IS_HTTP:
1943 -    case URL_IS_HKP:
1944 -       fd = davOpen(url, flags, mode, &u);
1945 -       if (fd == NULL || u == NULL)
1946 -           break;
1947 -
1948 -       cmd = ((flags & O_WRONLY)
1949 -               ?  ((flags & O_APPEND) ? "PUT" :
1950 -                  ((flags & O_CREAT) ? "PUT" : "PUT"))
1951 -               : "GET");
1952 -       u->openError = davReq(fd, cmd, path);
1953 -       if (u->openError < 0) {
1954 -           /* XXX make sure that we can exit through ufdClose */
1955 -           fd = fdLink(fd, "error ctrl (ufdOpen HTTP)");
1956 -           fd = fdLink(fd, "error data (ufdOpen HTTP)");
1957 -       } else {
1958 -           fd->bytesRemain = ((!strcmp(cmd, "GET"))
1959 -               ?  fd->contentLength : -1);
1960 -           fd->wr_chunked = ((!strcmp(cmd, "PUT"))
1961 -               ?  fd->wr_chunked : 0);
1962 -       }
1963 -       break;
1964      case URL_IS_DASH:
1965         assert(!(flags & O_RDWR));
1966         fd = fdDup( ((flags & O_WRONLY) ? STDOUT_FILENO : STDIN_FILENO) );
1967 @@ -2908,10 +2708,8 @@
1968             if (fd->nfps > 0 && fpno == -1 &&
1969                 fd->fps[fd->nfps-1].io == ufdio &&
1970                 fd->fps[fd->nfps-1].fp == fp &&
1971 -               (fd->fps[fd->nfps-1].fdno >= 0 || fd->req != NULL))
1972 +               (fd->fps[fd->nfps-1].fdno >= 0))
1973             {
1974 -               int hadreqpersist = (fd->req != NULL);
1975 -
1976                 if (fp)
1977                     rc = fflush(fp);
1978                 fd->nfps--;
1979 @@ -2921,26 +2719,9 @@
1980  /*@-usereleased@*/
1981                 if (fdGetFdno(fd) >= 0)
1982                     break;
1983 -               if (!fd->persist)
1984 -                   hadreqpersist = 0;
1985                 fdSetFp(fd, NULL);
1986                 fd->nfps++;
1987                 if (fp) {
1988 -                   /* HACK: flimsy Keepalive wiring. */
1989 -                   if (hadreqpersist) {
1990 -                       fd->nfps--;
1991 -/*@-exposetrans@*/
1992 -                       fdSetFp(fd, fp);
1993 -/*@=exposetrans@*/
1994 -/*@-refcounttrans@*/
1995 -                       (void) fdClose(fd);
1996 -/*@=refcounttrans@*/
1997 -                       fdSetFp(fd, NULL);
1998 -                       fd->nfps++;
1999 -/*@-refcounttrans@*/
2000 -                       (void) fdClose(fd);
2001 -/*@=refcounttrans@*/
2002 -                   } else
2003                         rc = fclose(fp);
2004                 }
2005                 fdPop(fd);
2006 @@ -3195,18 +2976,9 @@
2007             return NULL;
2008         }
2009      } else {
2010 -       FILE *fp;
2011 -       int fdno;
2012 -       int isHTTP = 0;
2013 -
2014         /* XXX gzdio and bzdio here too */
2015  
2016         switch (urlIsURL(path)) {
2017 -       case URL_IS_HTTPS:
2018 -       case URL_IS_HTTP:
2019 -       case URL_IS_HKP:
2020 -           isHTTP = 1;
2021 -           /*@fallthrough@*/
2022         case URL_IS_PATH:
2023         case URL_IS_DASH:
2024         case URL_IS_FTP:
2025 @@ -3214,7 +2986,7 @@
2026  if (_rpmio_debug)
2027  fprintf(stderr, "*** Fopen ufdio path %s fmode %s\n", path, fmode);
2028             fd = ufdOpen(path, flags, perms);
2029 -           if (fd == NULL || !(fdFileno(fd) >= 0 || fd->req != NULL))
2030 +           if (fd == NULL || !(fdFileno(fd) >= 0))
2031                 return fd;
2032             break;
2033         default:
2034 @@ -3223,15 +2995,6 @@
2035             return NULL;
2036             /*@notreached@*/ break;
2037         }
2038 -
2039 -       /* XXX persistent HTTP/1.1 returns the previously opened fp */
2040 -       if (isHTTP && ((fp = fdGetFp(fd)) != NULL) && ((fdno = fdGetFdno(fd)) >= 0 || fd->req != NULL))
2041 -       {
2042 -           /*@+voidabstract@*/
2043 -           fdPush(fd, fpio, fp, fileno(fp));   /* Push fpio onto stack */
2044 -           /*@=voidabstract@*/
2045 -           return fd;
2046 -       }
2047      }
2048      /*@=branchstate@*/
2049  
2050 @@ -3267,10 +3030,6 @@
2051      int i, rc = 0;
2052  
2053      if (fd == NULL) return -1;
2054 -    if (fd->req != NULL) {
2055 -       /* HACK: flimsy wiring for neon errors. */
2056 -       rc = (fd->syserrno  || fd->errcookie != NULL) ? -1 : 0;
2057 -    } else
2058      for (i = fd->nfps; rc == 0 && i >= 0; i--) {
2059  /*@-boundsread@*/
2060         FDSTACK_t * fps = &fd->fps[i];
2061 @@ -3305,9 +3064,6 @@
2062  {
2063      int i, rc = -1;
2064  
2065 -    if (fd->req != NULL)
2066 -       rc = 123456789; /* HACK: https has no steenkin fileno. */
2067 -    else
2068      for (i = fd->nfps ; rc == -1 && i >= 0; i--) {
2069  /*@-boundsread@*/
2070         rc = fd->fps[i].fdno;
2071 diff -ur rpm-4.4.7.org/rpmio/rpmio_internal.h rpm-4.4.7/rpmio/rpmio_internal.h
2072 --- rpm-4.4.7.org/rpmio/rpmio_internal.h        2006-06-18 20:54:59.000000000 +0200
2073 +++ rpm-4.4.7/rpmio/rpmio_internal.h    2006-10-17 22:18:51.308135000 +0200
2074 @@ -157,7 +157,6 @@
2075  /*@dependent@*/
2076      void *     url;            /* ufdio: URL info */
2077  /*@relnull@*/
2078 -    void *     req;            /* ufdio: HTTP request */
2079  
2080      int                rd_timeoutsecs; /* ufdRead: per FD_t timer */
2081      ssize_t    bytesRemain;    /* ufdio: */
2082 diff -ur rpm-4.4.7.org/rpmio/rpmrpc.c rpm-4.4.7/rpmio/rpmrpc.c
2083 --- rpm-4.4.7.org/rpmio/rpmrpc.c        2006-10-03 06:38:01.000000000 +0200
2084 +++ rpm-4.4.7/rpmio/rpmrpc.c    2006-10-17 22:20:28.658219000 +0200
2085 @@ -91,10 +91,6 @@
2086      case URL_IS_FTP:
2087         return ftpMkdir(path, mode);
2088         /*@notreached@*/ break;
2089 -    case URL_IS_HTTPS:
2090 -    case URL_IS_HTTP:
2091 -       return davMkdir(path, mode);
2092 -       /*@notreached@*/ break;
2093      case URL_IS_PATH:
2094         path = lpath;
2095         /*@fallthrough@*/
2096 @@ -118,15 +114,6 @@
2097      case URL_IS_FTP:
2098         return ftpChdir(path);
2099         /*@notreached@*/ break;
2100 -    case URL_IS_HTTPS:
2101 -    case URL_IS_HTTP:
2102 -#ifdef NOTYET
2103 -       return davChdir(path);
2104 -#else
2105 -       errno = EINVAL;         /* XXX W2DO? */
2106 -       return -2;
2107 -#endif
2108 -       /*@notreached@*/ break;
2109      case URL_IS_PATH:
2110         path = lpath;
2111         /*@fallthrough@*/
2112 @@ -151,10 +138,6 @@
2113      case URL_IS_FTP:
2114         return ftpRmdir(path);
2115         /*@notreached@*/ break;
2116 -    case URL_IS_HTTPS:
2117 -    case URL_IS_HTTP:
2118 -       return davRmdir(path);
2119 -       /*@notreached@*/ break;
2120      case URL_IS_PATH:
2121         path = lpath;
2122         /*@fallthrough@*/
2123 @@ -185,8 +168,6 @@
2124      case URL_IS_DASH:
2125      case URL_IS_HKP:
2126      case URL_IS_FTP:           /* XXX TODO: implement. */
2127 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2128 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2129      default:
2130         errno = EINVAL;         /* XXX W2DO? */
2131         return -2;
2132 @@ -208,10 +189,6 @@
2133  
2134      oldut = urlPath(oldpath, &oe);
2135      switch (oldut) {
2136 -    case URL_IS_HTTPS:
2137 -    case URL_IS_HTTP:
2138 -       return davRename(oldpath, newpath);
2139 -       /*@notreached@*/ break;
2140      case URL_IS_FTP:           /* XXX WRONG WRONG WRONG */
2141      case URL_IS_PATH:
2142      case URL_IS_UNKNOWN:
2143 @@ -233,8 +210,6 @@
2144             return -2;
2145         return ftpRename(oldpath, newpath);
2146         /*@notreached@*/ break;
2147 -    case URL_IS_HTTPS:         /* XXX WRONG WRONG WRONG */
2148 -    case URL_IS_HTTP:          /* XXX WRONG WRONG WRONG */
2149      case URL_IS_PATH:
2150         oldpath = oe;
2151         newpath = ne;
2152 @@ -258,8 +233,6 @@
2153  
2154      oldut = urlPath(oldpath, &oe);
2155      switch (oldut) {
2156 -    case URL_IS_HTTPS:         /* XXX WRONG WRONG WRONG */
2157 -    case URL_IS_HTTP:          /* XXX WRONG WRONG WRONG */
2158      case URL_IS_FTP:           /* XXX WRONG WRONG WRONG */
2159      case URL_IS_PATH:
2160      case URL_IS_UNKNOWN:
2161 @@ -273,8 +246,6 @@
2162  
2163      newut = urlPath(newpath, &ne);
2164      switch (newut) {
2165 -    case URL_IS_HTTPS:         /* XXX WRONG WRONG WRONG */
2166 -    case URL_IS_HTTP:          /* XXX WRONG WRONG WRONG */
2167      case URL_IS_FTP:           /* XXX WRONG WRONG WRONG */
2168      case URL_IS_PATH:
2169  if (_rpmio_debug)
2170 @@ -306,10 +277,6 @@
2171      case URL_IS_FTP:
2172         return ftpUnlink(path);
2173         /*@notreached@*/ break;
2174 -    case URL_IS_HTTPS:
2175 -    case URL_IS_HTTP:
2176 -       return davUnlink(path);
2177 -       /*@notreached@*/ break;
2178      case URL_IS_PATH:
2179         path = lpath;
2180         /*@fallthrough@*/
2181 @@ -1308,10 +1275,6 @@
2182      case URL_IS_FTP:
2183         return ftpStat(path, st);
2184         /*@notreached@*/ break;
2185 -    case URL_IS_HTTPS:
2186 -    case URL_IS_HTTP:
2187 -       return davStat(path, st);
2188 -       /*@notreached@*/ break;
2189      case URL_IS_PATH:
2190         path = lpath;
2191         /*@fallthrough@*/
2192 @@ -1338,10 +1301,6 @@
2193      case URL_IS_FTP:
2194         return ftpLstat(path, st);
2195         /*@notreached@*/ break;
2196 -    case URL_IS_HTTPS:
2197 -    case URL_IS_HTTP:
2198 -       return davLstat(path, st);
2199 -       /*@notreached@*/ break;
2200      case URL_IS_PATH:
2201         path = lpath;
2202         /*@fallthrough@*/
2203 @@ -1373,8 +1332,6 @@
2204      case URL_IS_DASH:
2205      case URL_IS_HKP:
2206      case URL_IS_FTP:           /* XXX TODO: implement. */
2207 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2208 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2209      default:
2210         errno = EINVAL;         /* XXX W2DO? */
2211         return -2;
2212 @@ -1399,8 +1356,6 @@
2213      case URL_IS_DASH:
2214      case URL_IS_HKP:
2215      case URL_IS_FTP:           /* XXX TODO: implement. */
2216 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2217 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2218      default:
2219         errno = EINVAL;         /* XXX W2DO? */
2220         return -2;
2221 @@ -1425,8 +1380,6 @@
2222      case URL_IS_DASH:
2223      case URL_IS_HKP:
2224      case URL_IS_FTP:           /* XXX TODO: implement. */
2225 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2226 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2227      default:
2228         errno = EINVAL;         /* XXX W2DO? */
2229         return -2;
2230 @@ -1451,8 +1404,6 @@
2231      case URL_IS_DASH:
2232      case URL_IS_HKP:
2233      case URL_IS_FTP:           /* XXX TODO: implement. */
2234 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2235 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2236      default:
2237         errno = EINVAL;         /* XXX W2DO? */
2238         return -2;
2239 @@ -1477,8 +1428,6 @@
2240      case URL_IS_DASH:
2241      case URL_IS_HKP:
2242      case URL_IS_FTP:           /* XXX TODO: implement. */
2243 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2244 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2245      default:
2246         errno = EINVAL;         /* XXX W2DO? */
2247         return -2;
2248 @@ -1503,8 +1452,6 @@
2249      case URL_IS_DASH:
2250      case URL_IS_HKP:
2251      case URL_IS_FTP:           /* XXX TODO: implement. */
2252 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2253 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2254      default:
2255         errno = EINVAL;         /* XXX W2DO? */
2256         return -2;
2257 @@ -1529,8 +1476,6 @@
2258      case URL_IS_DASH:
2259      case URL_IS_HKP:
2260      case URL_IS_FTP:           /* XXX TODO: implement. */
2261 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2262 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2263      default:
2264         errno = EINVAL;         /* XXX W2DO? */
2265         return -2;
2266 @@ -1558,8 +1503,6 @@
2267      case URL_IS_DASH:
2268      case URL_IS_HKP:
2269      case URL_IS_FTP:           /* XXX TODO: implement. */
2270 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2271 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2272      default:
2273         errno = EINVAL;         /* XXX W2DO? */
2274         return -2;
2275 @@ -1577,14 +1520,6 @@
2276      case URL_IS_FTP:
2277         return ftpReadlink(path, buf, bufsiz);
2278         /*@notreached@*/ break;
2279 -    case URL_IS_HTTPS:
2280 -    case URL_IS_HTTP:
2281 -#ifdef NOTYET
2282 -       return davReadlink(path, buf, bufsiz);
2283 -#else
2284 -       return -2;
2285 -#endif
2286 -       /*@notreached@*/ break;
2287      case URL_IS_PATH:
2288         path = lpath;
2289         /*@fallthrough@*/
2290 @@ -1617,8 +1552,6 @@
2291         break;
2292      case URL_IS_DASH:
2293      case URL_IS_HKP:
2294 -    case URL_IS_HTTPS:         /* XXX TODO: implement. */
2295 -    case URL_IS_HTTP:          /* XXX TODO: implement. */
2296      case URL_IS_FTP:           /* XXX TODO: implement. */
2297      default:
2298         errno = EINVAL;         /* XXX W2DO? */
2299 @@ -1685,8 +1618,6 @@
2300  fprintf(stderr, "*** Glob(%s,0x%x,%p,%p)\n", pattern, (unsigned)flags, (void *)errfunc, pglob);
2301  /*@=castfcnptr@*/
2302      switch (ut) {
2303 -    case URL_IS_HTTPS:
2304 -    case URL_IS_HTTP:
2305      case URL_IS_FTP:
2306  /*@-type@*/
2307         pglob->gl_closedir = Closedir;
2308 @@ -1730,10 +1661,6 @@
2309      case URL_IS_FTP:
2310         return ftpOpendir(path);
2311         /*@notreached@*/ break;
2312 -    case URL_IS_HTTPS: 
2313 -    case URL_IS_HTTP:
2314 -       return davOpendir(path);
2315 -       /*@notreached@*/ break;
2316      case URL_IS_PATH:
2317         path = lpath;
2318         /*@fallthrough@*/
2319 diff -ur rpm-4.4.7.org/rpmio/tget.c rpm-4.4.7/rpmio/tget.c
2320 --- rpm-4.4.7.org/rpmio/tget.c  2004-11-19 17:52:58.000000000 +0100
2321 +++ rpm-4.4.7/rpmio/tget.c      2006-10-17 22:20:47.995427500 +0200
2322 @@ -9,8 +9,6 @@
2323  
2324  static int _debug = 0;
2325  
2326 -int noNeon;
2327 -
2328  #define        HTTPSPATH       "https://localhost/test.txt"
2329  #define        HTTPPATH        "http://localhost/test.txt"
2330  #define        FTPPATH         "ftp://localhost/test.txt"
2331 @@ -40,8 +38,6 @@
2332   { "debug", 'd', POPT_ARG_VAL, &_debug, -1,            NULL, NULL },
2333   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
2334         N_("debug protocol data stream"), NULL},
2335 - { "noneon", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &noNeon, 1,
2336 -       N_("disable use of libneon for HTTP"), NULL},
2337   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
2338         N_("debug rpmio I/O"), NULL},
2339   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
2340 diff -ur rpm-4.4.7.org/rpmio/tglob.c rpm-4.4.7/rpmio/tglob.c
2341 --- rpm-4.4.7.org/rpmio/tglob.c 2004-11-19 17:53:05.000000000 +0100
2342 +++ rpm-4.4.7/rpmio/tglob.c     2006-10-17 22:21:01.712284750 +0200
2343 @@ -9,8 +9,6 @@
2344  
2345  static int _debug = 0;
2346  
2347 -int noNeon;
2348 -
2349  #define        HTTPSPATH       "https://localhost/rawhide/test/*.rpm"
2350  #if 0
2351  #define        HTTPPATH        "http://localhost/rawhide/test/*.rpm"
2352 @@ -52,8 +50,6 @@
2353   { "debug", 'd', POPT_ARG_VAL, &_debug, -1,            NULL, NULL },
2354   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
2355         N_("debug protocol data stream"), NULL},
2356 - { "noneon", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &noNeon, 1,
2357 -       N_("disable use of libneon for HTTP"), NULL},
2358   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
2359         N_("debug rpmio I/O"), NULL},
2360   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
2361 diff -ur rpm-4.4.7.org/rpmio/thkp.c rpm-4.4.7/rpmio/thkp.c
2362 --- rpm-4.4.7.org/rpmio/thkp.c  2005-01-04 17:35:12.000000000 +0100
2363 +++ rpm-4.4.7/rpmio/thkp.c      2006-10-17 22:21:10.696846250 +0200
2364 @@ -10,8 +10,6 @@
2365  static int _debug = 0;
2366  static int _printing = 0;
2367  
2368 -int noNeon;
2369 -
2370  #if 0
2371  #define        HKPPATH         "hkp://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF5C75256"
2372  #else
2373 @@ -95,8 +93,6 @@
2374         N_("debug protocol data stream"), NULL},
2375   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
2376         N_("debug protocol data stream"), NULL},
2377 - { "noneon", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &noNeon, 1,
2378 -       N_("disable use of libneon for HTTP"), NULL},
2379   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
2380         N_("debug rpmio I/O"), NULL},
2381   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
2382 diff -ur rpm-4.4.7.org/rpmio/tput.c rpm-4.4.7/rpmio/tput.c
2383 --- rpm-4.4.7.org/rpmio/tput.c  2004-11-19 17:53:11.000000000 +0100
2384 +++ rpm-4.4.7/rpmio/tput.c      2006-10-17 22:21:25.841792750 +0200
2385 @@ -9,8 +9,6 @@
2386  
2387  static int _debug = 0;
2388  
2389 -int noNeon;
2390 -
2391  #define        HTTPSPATH       "https://localhost/rawhide/toad/tput.txt"
2392  #define        HTTPPATH        "http://localhost/rawhide/toad/tput.txt"
2393  #define        FTPPATH         "ftp://localhost/home/test/tput.txt"
2394 @@ -100,8 +98,6 @@
2395   { "debug", 'd', POPT_ARG_VAL, &_debug, -1,            NULL, NULL },
2396   { "ftpdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_ftp_debug, -1,
2397         N_("debug protocol data stream"), NULL},
2398 - { "noneon", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &noNeon, 1,
2399 -       N_("disable use of libneon for HTTP"), NULL},
2400   { "rpmiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmio_debug, -1,
2401         N_("debug rpmio I/O"), NULL},
2402   { "urldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_url_debug, -1,
2403 diff -ur rpm-4.4.7.org/rpmio/url.c rpm-4.4.7/rpmio/url.c
2404 --- rpm-4.4.7.org/rpmio/url.c   2006-08-06 02:31:18.000000000 +0200
2405 +++ rpm-4.4.7/rpmio/url.c       2006-10-17 22:21:51.747411750 +0200
2406 @@ -148,7 +148,6 @@
2407      }
2408      if (u->sess != NULL) {
2409         /* HACK: neon include has prototype. */
2410 -       ne_session_destroy(u->sess);
2411         u->sess = NULL;
2412      }
2413      u->buf = _free(u->buf);
2414 @@ -352,9 +351,6 @@
2415  } urlstrings[] = {
2416      { "file://",       URL_IS_PATH },
2417      { "ftp://",                URL_IS_FTP },
2418 -    { "hkp://",                URL_IS_HKP },
2419 -    { "http://",       URL_IS_HTTP },
2420 -    { "https://",      URL_IS_HTTPS },
2421      { "-",             URL_IS_DASH },
2422      { NULL,            URL_IS_UNKNOWN }
2423  };
This page took 0.35051 seconds and 4 git commands to generate.