|
|
|
|
||||||
| comp.protocols.tcp-ip TCP and IP network protocols. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
If we receive a response that ends with a CRLF pair, how do we know
whether or not more lines follow? In other words, this could be a multi-line response, but our first recv function call only returned the first line. So how do we know whether or not we should keep looking for more response lines? Obviously I'm missing something here; any would be greatly appreciated. Thanks, M. McDonnell |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Sun, 6 May 2007, MichaelDMcDonnell@yahoo.com wrote:
> If we receive a response that ends with a CRLF pair, how do we know > whether or not more lines follow? In other words, this could be a > multi-line response, but our first recv function call only returned > the first line. So how do we know whether or not we should keep > looking for more response lines? ftp://ftp.rfc-editor.org/in-notes/rfc1939.txt The answer to your question is on page 3. > Obviously I'm missing something here; any would be greatly > appreciated. What you are missing is that you should read the specification, in this case RFC 1939, instead of making guesses from empirical testing (or asking people questions in newsgroups). Nobody should even think of implementing software for a communications protocol without reading the specification for that protocol. -- Mark -- http://panda.com/mrc Democracy is two wolves and a sheep deciding what to eat for lunch. Liberty is a well-armed sheep contesting the vote. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On May 6, 1:07 pm, Mark Crispin <m...@CAC.Washington.EDU> wrote:
> On Sun, 6 May 2007, MichaelDMcDonn...@yahoo.com wrote: > > If we receive a response that ends with a CRLF pair, how do we know > > whether or not more lines follow? In other words, this could be a > > multi-line response, but our first recv function call only returned > > the first line. So how do we know whether or not we should keep > > looking for more response lines? > > ftp://ftp.rfc-editor.org/in-notes/rfc1939.txt > > The answer to your question is on page 3. > > > Obviously I'm missing something here; any would be greatly > > appreciated. > > What you are missing is that you should read the specification, in this > case RFC 1939, instead of making guesses from empirical testing (or asking > people questions in newsgroups). > > Nobody should even think of implementing software for a communications > protocol without reading the specification for that protocol. > > -- Mark -- > > http://panda.com/mrc > Democracy is two wolves and a sheep deciding what to eat for lunch. > Liberty is a well-armed sheep contesting the vote. Mark, Yes, I looked at the spec before posting, but didn't see an obvious answer to my question. I'll look again, but in the meantime if anyone can give me an answer I'd appreciate it. Thanks, MDM |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On May 6, 3:18 pm, MichaelDMcDonn...@yahoo.com wrote:
> On May 6, 1:07 pm, Mark Crispin <m...@CAC.Washington.EDU> wrote: > > > > > > > On Sun, 6 May 2007, MichaelDMcDonn...@yahoo.com wrote: > > > If we receive a response that ends with a CRLF pair, how do we know > > > whether or not more lines follow? In other words, this could be a > > > multi-line response, but our first recv function call only returned > > > the first line. So how do we know whether or not we should keep > > > looking for more response lines? > > >ftp://ftp.rfc-editor.org/in-notes/rfc1939.txt > > > The answer to your question is on page 3. > > > > Obviously I'm missing something here; any would be greatly > > > appreciated. > > > What you are missing is that you should read the specification, in this > > case RFC 1939, instead of making guesses from empirical testing (or asking > > people questions in newsgroups). > > > Nobody should even think of implementing software for a communications > > protocol without reading the specification for that protocol. > > Yes, I looked at the spec before posting, but didn't see an obvious > answer to my question. I'll look again, but in the meantime if anyone > can give me an answer I'd appreciate it. If the command is defined to have multi-line response, you need to read the response until you get the cr-lf-period-cr-lf terminator. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On 7 May 2007 00:54:18 -0700, robertwessel2@yahoo.com <robertwessel2@yahoo.com> wrote:
> On May 6, 3:18 pm, MichaelDMcDonn...@yahoo.com wrote: >> On May 6, 1:07 pm, Mark Crispin <m...@CAC.Washington.EDU> wrote: >> >> > On Sun, 6 May 2007, MichaelDMcDonn...@yahoo.com wrote: >> > > If we receive a response that ends with a CRLF pair, how do we know >> > > whether or not more lines follow? In other words, this could be a >> > > multi-line response, but our first recv function call only returned >> > > the first line. So how do we know whether or not we should keep >> > > looking for more response lines? >> >> >ftp://ftp.rfc-editor.org/in-notes/rfc1939.txt >> >> > The answer to your question is on page 3. >> >> > > Obviously I'm missing something here; any would be greatly >> > > appreciated. >> >> > What you are missing is that you should read the specification, in this >> > case RFC 1939, instead of making guesses from empirical testing (or asking >> > people questions in newsgroups). >> >> > Nobody should even think of implementing software for a communications >> > protocol without reading the specification for that protocol. >> >> Yes, I looked at the spec before posting, but didn't see an obvious >> answer to my question. I'll look again, but in the meantime if anyone >> can give me an answer I'd appreciate it. > > > If the command is defined to have multi-line response, you need to > read the response until you get the cr-lf-period-cr-lf terminator. Which is, of course, what page three of RFC 1939 says, in very clear language. The original poster needs to learn to read specs more carefully, because this one was IMHO hard to miss. /Jorgen -- // Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu \X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn! |
|
![]() |
| Outils de la discussion | |
|
|