LibWWW 5.2, ComLine, HTNextField, and empty fields

Hi.  I am testing a procedure using ComLine of LibWWW v5.2.
The line that I use is:

./w3c -post http://pbil.univ-lyon1.fr/cgi-bin/query_www -form
"mode=standard" "db=Hovergen" "o1=DEFAULT" "c1=Keyword" "q1=fam000841"
"o2=AND" "c2=Keyword" "q2=" "o3=AND" "c3=Keyword" "q3=" "o4=AND"
"c4=Keyword" "q4=" "l=list"

  Notice that the fields q2, q3, and q4 do not have values.  The above
command fails.  When using tcpdump to watch the communication with the
server I found that the q2, q3, and q4 fields where not in the message.
Unfortunately this particular server and I suspect others do not expect
fields without values to be removed.

  The problem seems to be that the calls to HTNextField() (line 464 of 
HTLine.c) return NULL instead of "" when parsing these fields.  The 
documentation does not say what should happen in the event of an empty
value.  While it would be convenient that HTNextField() return ""
instead of NULL in this case, would that behavior break something else?

  Thanks.

---
Kent Vander Velden
kent@iastate.edu

Received on Friday, 20 November 1998 16:53:24 UTC