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
7 if (errflag == COMM_ERR_CLOSING)
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);
18 if (errflag == COMM_ERR_CLOSING)
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);
36 + httpRequestBodyHandler2(void *data)
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);
45 httpRequestBodyHandler(char *buf, ssize_t size, void *data)
47 HttpStateData *httpState = (HttpStateData *) data;
51 comm_close(httpState->fd);
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);
61 comm_write(httpState->fd, buf, size, httpSendRequestEntry, data, memFree8K);
62 } else if (size == 0) {
65 if (errflag == COMM_ERR_CLOSING)
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);
76 if (errflag == COMM_ERR_CLOSING)
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);
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
95 http_state_flags flags;