[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnatsd protocol inconsistency

From: Mike Hoolehan
Subject: gnatsd protocol inconsistency
Date: Tue, 26 Nov 2002 14:12:07 -0500
User-agent: Mutt/

In working with gnatsd, I've found a gnatsd response that doesn't seem to
conform to the stated protocol.  With the CHEK initial command, gnatsd will
response with something like:

411 There is a bad value `foo' for the field `Category'.
403 Errors found checking PR text.

when an invalid field is supplied.  However, according to the gnatsd 
description in the documentation, the first error message should have a 
hyphen after the 411.  

The code in cmds.c which handles the printing of the 411 error will put
hyphen on the first n-1 411 errors messages (there may be multiple) but not 
on the nth message.  In other words, it doesn't seem to expect that 403
error to bring up the rear.  

So there are two solutions, I suppose:  Drop that last 403 error (line 726 
of cmds.c in 3.999.1) or always put a hypen in those 411 errors (line 86 
of same).  

I don't think that final 403 error is very handy since it's clear from the 
existence of the previous 411 lines that errors were found.  But I may not
be aware of other circumstances which account for its presence.  

Below is the part of the gnatsd documentation I referred to earlier.

Mike Hoolehan

Codes 400-599
An error occurred, usually because of invalid command parameters or
invalid input from the client, missing arguments to the command, or a
command was issued out of sequence. The human-readable message associated
with the response line describes the general problem encountered with the
Multiple error messages may be returned from a command; in this case the `-'
continuation character is used on all but the last response line. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]