Should have been a bit clearer in my response.. see below.
Senthil Kumar .R wrote:
> Hi Henrik,
>
> Here is the code for diff -u
>
> diff -u http.c http.ctracefix
> --- http.c Thu May 9 14:43:51 2002
> +++ http.ctracefix Thu May 23 08:55:10 2002
> @@ -516,6 +516,7 @@
> } else if (entry->mem_obj->inmem_hi == 0) {
> ErrorState *err;
> err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR);
> + err->request = requestLink((request_t *) request);
> err->xerrno = errno;
> fwdFail(httpState->fwd, err);
> comm_close(fd);
The above is already fixed in the current sources (including Squid-2.4).
> @@ -526,6 +527,7 @@
> ErrorState *err;
> err = errorCon(ERR_ZERO_SIZE_OBJECT, HTTP_SERVICE_UNAVAILABLE);
> err->xerrno = errno;
> + err->request = requestLink((request_t *) request);
> fwdFail(httpState->fwd, err);
> httpState->eof = 1;
> comm_close(fd);
This too..
> @@ -737,7 +739,11 @@
> break;
> default:
> /* pass on all other header fields */
> + if ( orig_request->method != METHOD_TRACE)
> httpHeaderAddEntry(hdr_out, httpHeaderEntryClone(e));
> + else
> + continue ;
> +
> }
> }
This do not look correct. Why do you not want Squid to forward headers it do
not know about in TRACE requests?
> @@ -855,7 +861,7 @@
>
> debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n",
> httpState->fd, httpState);
>
> - if (httpState->orig_request->content_length > 0)
> + if ((httpState->orig_request->content_length > 0) && (req->method ==
> METHOD_POST))
> sendHeaderDone = httpSendRequestEntry;
> else
> sendHeaderDone = httpSendComplete;
And this is most certainly NOT correct as there is numerous request methods
that may have a request entity, not only POST. The most obvious one is PUT,
but the truth is that nearly any request method can have a request entity.
Regards
Henrik
Received on Thu Jun 06 2002 - 09:07:09 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:39 MST