ietf-nntp HDR replacement text

Clive D.W. Feather clive at demon.net
Wed Jul 3 04:45:25 PDT 2002


Russ Allbery said:
>> I don't think this is the right thing to do. Consider:
>>     HDR subject 12345
>>     HDR subject 12345-12345
>> Shouldn't these always return the same thing ? If there's no article
>> 12345, what will/should the latter do ?
>> Compare it to:
>>     HDR subject 12345-12999
>> when none of the articles in that range exist.
> 
> Hm.  Good point.  Having it just return an empty result is consistent with
> how XHDR is currently implemented in INN and also seems consistent with
> XOVER.  It's *not* consistent with the OVER text currently in the draft,
> however, which states:
> 
>     If no articles are in the range specified, the server returns a 420
>     error response.

> I prefer that all of your examples above do the same thing,

So do I.

> and that all
> of them return a 423 error code.

Note that it makes little difference to the client - both an error code and
an empty list are easy to detect.

I've got one practical issue. Can the server easily tell, at the start of
processing the command, whether there are any articles in the range ? For
some implementations, sure. But for others I can see the code having to be
along the lines of:

    respond = true;
    for (art = low_bound; art <= high_bound; art++)
        if (article_exists (art))
        {
            if (respond)
            {
                send_response (223);
                respond = false;
            }
            send_bits_of_article (art);
        }
    if (respond)
        send_response (423);
    else
        send_final_dot ();

instead of the much simpler:

    send_response (223);
    for (art = low_bound; art <= high_bound; art++)
        if (article_exists (art))
            send_bits_of_article (art);
    send_final_dot ();

Do we care ?

> Even more important than that, however,
> is for HDR to do the same thing that OVER would in the same situation.

Agreed. But let's first decide the right thing and then write the spec.

-- 
Clive D.W. Feather  | Work:  <clive at demon.net>   | Tel:  +44 20 8371 1138
Internet Expert     | Home:  <clive at davros.org>  | Fax:  +44 870 051 9937
Demon Internet      | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc            |                            | NOTE: fax number change



More information about the ietf-nntp mailing list