Re: Patch

Dirk Nimmich <[email protected]>
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
Urs Janßen wrote:
> what would be the correct response code on a timeout? 205? 400? 502?
> no responsecode at all? (i've seen 503, 400 and no response code at all).

No responsecode. The server is only allowed to "talk" in response to
a client command, so if the server wants to drop the connection it
just has to do so. The client has to be able to cope with that
anyway. (And if INN 2.2.3 did then tin would have reconnected
and resent the command earlier in get_server so there would have
been no need for this "workaround".)

If the server would like to send a response code (breaking the
protocol) 503 is wrong in any case. 400 may be acceptable since this
is the only response code after which the server is allowed to drop
the connection on its side (next to 205 after a QUIT or 502 at
connection startup).

> if (((respcode == ERR_FAULT && !strncmp(last_put, "ARTICLE", 7)) || respcode == ERR_GOODBYE || respcode == OK_GOODBYE) && last_put[0] != '\0' && strcmp(last_put, "QUIT")) {

Ok, if you insist. ;-) It may be a good idea to put the
last_put[0] != '\0' condition to the beginning.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.