[Xitami-Dev] LRWP Error Response
Ewen McNeill
xitami-dev@lists.xitami.org
Sun, 07 Apr 2002 20:03:16 +1200
In message <200203181438.PAA16469@sxpublic.nxrda.imatix.net>, "bernd hohmann" writes:
>what is the proposed error-response for xitami and LRWP 2.0 ?
>as far as i understand Ewens implementation the implementation
>returns a buffer with 1024 bytes length starting with
>"REJECTED+delimiter" following the errormessage and i have to
>check, if there is a second delimitier after the message itself.
I assume you're talking about at the signon phase.
In LRWP1.0 the response would be ERROR (IIRC), with no terminator.
In LRWP2.0 as far as I recall the idea was that it'd send REJECTED, a
terminator character (0xFF), and then an error message, and then another
terminator.
There's no fixed length blocks (those are just buffers in the program,
and not all of them will be sent if they're not needed).
>it no delimiter was found i can fetch another 1024 byte block.
>can i rely on 1024 byte sized buffers ?
>From a receiving point of view, you need to keep receiving (in LRWP2.0)
until you've received the two terminators, and then extract the error
message. If you don't want the error message you can just close the
connection of course.
Reading (with Java, I'm guessing) into 1024-byte buffers should be okay;
it should return you what is available, and you can then check to see if
it's complete or not.
FWIW, the iMatix ServletRunner (0.3 beta) has Java implementation code
to handle this (LRWP_2_0_WebServerConnection.java) which AFAIK will work.
You might want to at least look through what that does to understand how
the protocol is handled.
Ewen
--
Ewen McNeill, Technical Consultant, iMatix Corporation www.imatix.com