Re: Suggestions for custom application-layer protocol?
From: James Antill (james-netnews_at_and.org)
Date: 05/27/05
- Next message: thesushant_at_gmail.com: "Need guidance !!"
- Previous message: James Antill: "Re: Suggestions for custom application-layer protocol?"
- In reply to: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: Mark: "Re: Suggestions for custom application-layer protocol?"
- Reply: Mark: "Re: Suggestions for custom application-layer protocol?"
- Reply: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 May 2005 01:12:46 -0400
On Fri, 27 May 2005 00:04:16 +0000, Grant Edwards wrote:
> On 2005-05-26, Mark <mark_2811nospam@excite.com> wrote:
>
>> I expect I will end up with a text-based protocol, with a header
>> that indicates the number of bytes in the payload.
>
> If you're using a text-based protocol, you don't nead a header
> with a payload count to tell you where the message ends. Use
> an end-of-message character or string. The cr/lf pair is used
> as the end-of-message delimiter by a lot of text-based
> runs-on-top of TCP protocols. That approach works wonderfully
> with line-oriented high-level text-handling libraries and
> utilties -- you can do all sorts of useful stuff using nothing
> but a few utilities like netcat, expect, and so on.
It interacts well with telnet, which is about the best thing that can be
said for it. There are large problems with how you limit "too long" lines,
and what happens when you hit a CR or LF on it's own. Esp. if you put
something like a perl regexp directly on the socket.
The HTTP response splitting problem is entirely the fault of pretending
CRLF terminated lines are a good idea.
-- James Antill -- james@and.org http://www.and.org/vstr/httpd
- Next message: thesushant_at_gmail.com: "Need guidance !!"
- Previous message: James Antill: "Re: Suggestions for custom application-layer protocol?"
- In reply to: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Next in thread: Mark: "Re: Suggestions for custom application-layer protocol?"
- Reply: Mark: "Re: Suggestions for custom application-layer protocol?"
- Reply: Grant Edwards: "Re: Suggestions for custom application-layer protocol?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|