]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch
- condition to enable TSC has been reverted just for us, so update patch
[packages/rpm.git] / rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch
CommitLineData
70f8787d
JR
1--- rpm-5.4.10/rpmio/rpmdav.c.dl_error~ 2012-07-06 17:39:19.000000000 +0200
2+++ rpm-5.4.10/rpmio/rpmdav.c 2012-07-11 19:49:00.504968365 +0200
3@@ -1722,6 +1722,7 @@ int davReq(FD_t ctrl, const char * httpC
4 {
5 urlinfo u;
6 int rc = 0;
7+ const ne_status *status;
8
9 assert(ctrl != NULL);
10 u = (urlinfo) ctrl->u;
11@@ -1789,10 +1790,24 @@ assert(ctrl->req != NULL);
12 }
13
14 /* XXX somewhere else instead? */
15-if (_dav_debug) {
16- const ne_status *status = ne_get_status((ne_request *)ctrl->req);
17-fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
18-}
19+ status = ne_get_status((ne_request *)ctrl->req);
20+ if (_dav_debug)
21+ fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
22+
23+ switch (status->code) {
24+ case 200:
25+ case 201: /* 201 Created. */
26+ break;
27+ case 204: /* HACK: if overwriting, 204 No Content. */
28+ case 403: /* 403 Forbidden. */
29+ rc = FTPERR_UNKNOWN;
30+ break;
31+ default:
32+ rc = FTPERR_FILE_NOT_FOUND;
33+ break;
34+ }
35+ if (rc || _dav_debug)
36+ fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
37
38 if (rc)
39 goto errxit;
40--- rpm-5.4.10/rpmio/rpmio.c.dl_error~ 2012-07-06 17:39:19.000000000 +0200
41+++ rpm-5.4.10/rpmio/rpmio.c 2012-07-11 19:47:59.396732322 +0200
42@@ -2306,9 +2306,12 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o
43 u->openError = httpReq(fd, cmd, path);
44 #endif
45 if (u->openError < 0) {
46+ /* XXX rpmdav doesn't behave consistently with the rest...*/
47+#ifndef WITH_NEON
48 /* XXX make sure that we can exit through ufdClose */
49- fd = fdLink(fd, "error ctrl (ufdOpen HTTP)");
50- fd = fdLink(fd, "error data (ufdOpen HTTP)");
51+ fd = u->ctrl = fdLink(fd, "error ctrl (ufdOpen HTTP)");
52+ fd = u->data fdLink(fd, "error data (ufdOpen HTTP)");
53+#endif
54 } else {
55 fd->bytesRemain = ((!strcmp(cmd, "GET"))
56 ? fd->contentLength : -1);
This page took 0.028402 seconds and 4 git commands to generate.