RE: Broken Pipe

Hi,

Try to put logic similar to one from HTReader_read(.. ) function that deals with
broken pine to HTWriter_write(..) function (instead of returning HT_ERROR from
HTReaded_read when broken pipe happens). Those functions are in HTReader.c and
HTWriter.c respectively.  

Also try to change code in HTTP.c function HTTPEvent(...) just before the w
hile loop from:


    } else if (type == HTEvent_RESET) {
        HTTPCleanup(request, HT_RECOVER_PIPE);
        http->state = HTTP_BEGIN; 
        return HT_OK;
    }
 

to:

    } else if (type == HTEvent_RESET) {
        HTTPCleanup(request, HT_RECOVER_PIPE);
        http->state = HTTP_RECOVER_PIPE;       /* HERE!!! */
        return HT_OK;
    }


The first change I have tried and it saves me from some broken pipes.
The second change I have not tried (did not have time) but it might work.
Please let me know it is does.

Olga Antropova.

On 21-Aug-99 Taylor Brockman wrote:
> 
> 
> What would be the cause of a 'Broken Pipe' error in libwww? 
> 
> I know that it deals with unix sockets being broken in transfer.
> 
> I seem to be getting them in my program, when I am downloading HTTP Data, and
> I need a way to prevent them.
> 
> 
> Thanks,
> Brockman

Received on Monday, 23 August 1999 10:10:00 UTC