Console: Bad net protocol
Bug #492429 reported by
Nick Chadwick
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IVLE |
Fix Released
|
Medium
|
David Coles |
Bug Description
Console (and wherever else we use a custom non-HTTP socket connection
protocol) has an issue.
We simply loop and read all bytes till there are no bytes left in the pipe,
and assume that's the end of the message.
What happens if some bytes are written and there is a delay? We should be
waiting for the rest of the message.
What happens if two messages come at the same time? We should stop after
the first one and read the second.
We can fix this in two ways. Firstly, we could attach a length to the front
of the message. Secondly, if it's always a JSON dictionary, we could read
until we see a '}' character outside of a string. The second way is pretty
messy so I advocate length field.
Changed in ivle: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Date: 2008-02-28 18:31
mattgiuca says:
'Tom what does chat do now? Is it a good citizen?
Lowering this priority to 3, but it may actually be fixed or unnecessary.'
Date: 2008-02-28 18:35
drtomc says:
'We should attach a length.'