On Mon, 2 Aug 2004 12:13:30 +0900 (JST), Tsuyoshi SASAMOTO
<[EMAIL PROTECTED]> wrote:
> >(b) I omitted the unrelated fix which was part of your patch; care to
> >provide an explanation?
> 
> Sorry...
> ----------------------------------------------------------------------
>     body = strchr(iov.iov_base, 0); // `body` would be `headers + strlen(headers)`
>     if (!body) {
>         return 1;
>     }
> 
>     body++;                         // `body` would be `headers + strlen(headers) + 
> 1`
>     bodylen = strlen(body);
> 
>     headers = iov.iov_base;
>     headerslen = body - headers;    // `body - headers` is `strlen(headers) + 1` !!!
> ----------------------------------------------------------------------
> So, `headerslen` should be `body - 1 - headers`.

attached patch looks a bit simpler; does it look okay to you?

Attachment: patch
Description: Binary data

Reply via email to