W3C home > Mailing lists > Public > www-lib@w3.org > October to December 1998

LibWWW 5.2, ComLine, HTNextField, and empty fields

From: Kent Vander Velden <graphix@iastate.edu>
Date: Fri, 20 Nov 1998 15:53:21 CST
Message-Id: <199811202153.PAA30861@isua5.iastate.edu>
To: www-lib@w3.org

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?


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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:48 UTC