]> git.pld-linux.org Git - packages/cups.git/blame - cups-auth.patch
- rel 5
[packages/cups.git] / cups-auth.patch
CommitLineData
f3d5ca43
JR
1Index: cups/request.c
2===================================================================
3--- cups/request.c (revision 9973)
4+++ cups/request.c (revision 9974)
5@@ -248,16 +248,9 @@
6
7 while ((bytes = (int)read(infile, buffer, sizeof(buffer))) > 0)
8 {
9- if (httpCheck(http))
10- {
11- _httpUpdate(http, &status);
12-
13- if (status >= HTTP_MULTIPLE_CHOICES)
14- break;
15- }
16-
17- if (httpWrite2(http, buffer, bytes) < bytes)
18- break;
19+ if ((status = cupsWriteRequestData(http, buffer, bytes))
20+ != HTTP_CONTINUE)
21+ break;
22 }
23 }
24
25@@ -265,13 +258,11 @@
26 * Get the server's response...
27 */
28
29- if (status == HTTP_CONTINUE || status == HTTP_OK)
30+ if (status != HTTP_ERROR)
31 {
32 response = cupsGetResponse(http, resource);
33- status = http->status;
34+ status = httpGetStatus(http);
35 }
36- else
37- httpFlush(http);
38
39 DEBUG_printf(("2cupsDoIORequest: status=%d", status));
40
41@@ -785,7 +776,17 @@
42 */
43
44 if (status >= HTTP_MULTIPLE_CHOICES)
45+ {
46+ _cupsSetHTTPError(status);
47+
48+ do
49+ {
50+ status = httpUpdate(http);
51+ }
52+ while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
53+
54 httpFlush(http);
55+ }
56
57 switch (status)
58 {
59@@ -922,6 +923,13 @@
60 if (status >= HTTP_MULTIPLE_CHOICES)
61 {
62 _cupsSetHTTPError(status);
63+
64+ do
65+ {
66+ status = httpUpdate(http);
67+ }
68+ while (status != HTTP_ERROR && http->state == HTTP_POST_RECV);
69+
70 httpFlush(http);
71 }
72
This page took 0.070232 seconds and 4 git commands to generate.