Re: -902

>On 17-Dec-98 Jim_Ravan@avid.com wrote:
>
> My PUT is returning HT_INTERRUPTED, -902. What does this mean? Is there
> documentation on the error codes other than the comments in HTUtils.h?
>
> regards,
> -jim

On 18-Dec-98 olga@eai.com wrote:
>
>Maybe it has something to do with SIGINT. There is no handler in
HTReader_read
>(and HTWriter_write) for interrupt occuring while reading form socket.
>I added my own handler there for socerrno == EINTR.
>
>Olga.

Well, I put some breakpoints in the code and started stepping the debugger.
The minute I saw the reply from my PUT, I was worried. I did a PUT on a
document, foo.xml, whose text was "<this is a test>". The HTTP server
replied:

     HTTP/1.1 200 OK
     Server: Microsoft-IIS/4.0
     Date: Sat, 19 Dec 1998 18:39:55 GMT
     Content-Type: text/html
     Content-Length 56
     Allow: OPTIONS, TRACE, GET, HEAD, PUT, DELETE

     <body><h1>foo.xml was written successfully. </h1></body>

So basically, HTReader_read, the socket stream, read the socket, and got
the data above. That routine then passed the data downstream to
HTTPStatus_put_block, who then passed the data downstream to
HTMIME_put_block. The MIME header parser then started parsing the header,
and came to the <CR><LF><CR><LF> body separator. Upon encountering that,
the remaining body data was passed downstream to (as I suspected by this
time) THE GENERIC ERROR STREAM. The error stream HTErrorStream_write,
simply replies HT_ERROR (-1, Generic failure). That eventually cascades
back and causes the request to generate an HTEvent_Close event, which tears
everything down and causes the PUT request to return -902.

So, now I know what the *real* problem is. I just have to understand why
there isn't anyone downstream of the MIME header parser to handle the body.
I suspect I might not have a content translator installed that I need (but
... "text/html"? That's pretty basic stuff. It's hard for me to understand
why I didn't get a "text/html" decoder by default from
HTProfile_newNoCacheClient()) But progress is being made.

regards and thanks Henrik and Olga,
-jim

P.S. and if anyone wants to pipe up and explain why there was an error
stream, instead of, say, a black hole, downstream of the MIME header
parser, I'd be very happy.

Received on Saturday, 19 December 1998 15:29:01 UTC