]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE5-post_assert.patch
- typo
[packages/squid.git] / squid-2.5.STABLE5-post_assert.patch
1 Index: squid/src/http.c
2 diff -c squid/src/http.c:1.384.2.13 squid/src/http.c:1.384.2.14
3 *** squid/src/http.c:1.384.2.13 Fri Mar 19 01:56:55 2004
4 --- squid/src/http.c    Sun Apr 18 17:43:30 2004
5 ***************
6 *** 715,724 ****
7       if (errflag == COMM_ERR_CLOSING)
8         return;
9       if (errflag) {
10 !       err = errorCon(ERR_WRITE_ERROR, HTTP_INTERNAL_SERVER_ERROR);
11 !       err->xerrno = errno;
12 !       err->request = requestLink(httpState->orig_request);
13 !       errorAppendEntry(entry, err);
14         comm_close(fd);
15         return;
16       } else {
17 --- 715,726 ----
18       if (errflag == COMM_ERR_CLOSING)
19         return;
20       if (errflag) {
21 !       if (entry->mem_obj->inmem_hi == 0) {
22 !           err = errorCon(ERR_WRITE_ERROR, HTTP_INTERNAL_SERVER_ERROR);
23 !           err->xerrno = errno;
24 !           err->request = requestLink(httpState->orig_request);
25 !           errorAppendEntry(entry, err);
26 !       }
27         comm_close(fd);
28         return;
29       } else {
30 ***************
31 *** 1110,1115 ****
32 --- 1112,1126 ----
33   }
34   
35   static void
36 + httpRequestBodyHandler2(void *data)
37 + {
38 +     HttpStateData *httpState = (HttpStateData *) data;
39 +     char *buf = httpState->body_buf;
40 +     httpState->body_buf = NULL;
41 +     comm_write(httpState->fd, buf, httpState->body_buf_sz, httpSendRequestEntry, data, memFree8K);
42 + }
43
44 + static void
45   httpRequestBodyHandler(char *buf, ssize_t size, void *data)
46   {
47       HttpStateData *httpState = (HttpStateData *) data;
48 ***************
49 *** 1125,1130 ****
50 --- 1136,1147 ----
51                 comm_close(httpState->fd);
52                 return;
53             }
54 +           httpState->body_buf = buf;
55 +           httpState->body_buf_sz = size;
56 +           /* Give response some time to propagate before sending rest
57 +            * of request in case of error */
58 +           eventAdd("POST delay on response", httpRequestBodyHandler2, httpState, 2.0, 1);
59 +           return;
60         }
61         comm_write(httpState->fd, buf, size, httpSendRequestEntry, data, memFree8K);
62       } else if (size == 0) {
63 ***************
64 *** 1154,1163 ****
65       if (errflag == COMM_ERR_CLOSING)
66         return;
67       if (errflag) {
68 !       err = errorCon(ERR_WRITE_ERROR, HTTP_INTERNAL_SERVER_ERROR);
69 !       err->xerrno = errno;
70 !       err->request = requestLink(httpState->orig_request);
71 !       errorAppendEntry(entry, err);
72         comm_close(fd);
73         return;
74       }
75 --- 1171,1182 ----
76       if (errflag == COMM_ERR_CLOSING)
77         return;
78       if (errflag) {
79 !       if (entry->mem_obj->inmem_hi == 0) {
80 !           err = errorCon(ERR_WRITE_ERROR, HTTP_INTERNAL_SERVER_ERROR);
81 !           err->xerrno = errno;
82 !           err->request = requestLink(httpState->orig_request);
83 !           errorAppendEntry(entry, err);
84 !       }
85         comm_close(fd);
86         return;
87       }
88 Index: squid/src/structs.h
89 diff -c squid/src/structs.h:1.408.2.23 squid/src/structs.h:1.408.2.24
90 *** squid/src/structs.h:1.408.2.23      Wed Feb  4 10:42:28 2004
91 --- squid/src/structs.h Sun Apr 18 17:43:30 2004
92 ***************
93 *** 986,991 ****
94 --- 986,992 ----
95       http_state_flags flags;
96       FwdState *fwd;
97       char *body_buf;
98 +     int body_buf_sz;
99   };
100   
101   struct _icpUdpData {
This page took 0.035175 seconds and 3 git commands to generate.