ComLine -post bug ?
Subject: ComLine -post bug ?
From: Henrik Frystyk Nielsen <email@example.com>
Date: Wed, 01 May 1996 15:43:36 -0400
From firstname.lastname@example.org Wed May 1 15: 43:41 1996
Reply-To: Henrik Frystyk Nielsen <email@example.com>
X-Mailer: exmh version 1.6.2 7/18/95
------- Forwarded Message
Received: from www10.w3.org by www18.w3.org (5.0/NSCS-1.0S)
id AA21161; Tue, 30 Apr 1996 07:55:02 +0500
Received: from www4.inria.fr by www10.w3.org (5.0/NSCS-1.0S)
id AA02909; Tue, 30 Apr 1996 07:54:58 +0500
Received: by www4.inria.fr (8.6.13/8.6.12) id NAA04514; Tue, 30 Apr 1996
Date: Tue, 30 Apr 1996 13:54:57 +0200
Subject: forwarded message from Fabien Campagne
From: Hakon Lie <firstname.lastname@example.org>
- ------- start of forwarded message (RFC 934 encapsulation) -------
Received: from sophia.inria.fr by www4.inria.fr (8.6.13/8.6.12) with ESMTP id
TAA01753 for <email@example.com>; Mon, 29 Apr 1996 19:05:44 +0200
Received: from www10.w3.org by sophia.inria.fr (8.6.13/8.6.12) with SMTP id
TAA11076 for <firstname.lastname@example.org>; Mon, 29 Apr 1996 19:05:39 +0200
Received: from brown.incm.u-nancy.fr (irishost.lctn.u-nancy.fr) by
id AA29557; Mon, 29 Apr 1996 13:05:17 +0500
Received: from yellow.incm.u-nancy.fr by brown.incm.u-nancy.fr via ESMTP
for <@brown.incm.u-nancy.fr:email@example.com> id TAA24520; Mon, 29 Apr 1996
Received: by yellow.incm.u-nancy.fr (950413.SGI.8.6.12/950213.SGI.AUTOCF)
id SAA14569; Mon, 29 Apr 1996 18:50:14 +0100
From: Fabien Campagne <firstname.lastname@example.org>
Subject: ComLine -post bug ?
Date: Mon, 29 Apr 1996 18:49:58 +0100 (EDT)
Content-Type: TEXT/PLAIN; charset=US-ASCII
I think I found a bug (or maybe it isn't because the documentation does'nt
really describe what should be the correct behavior :-)
if you have a file named "iaf" that contains : "lname=campagne"
and you try:
ComLine -post iaf -dest http://www.iaf.net/searchresults.html
This example should feed the internet address finder Form with a
correct input then you get back : nothing.
ComLine is not waiting for a reply after a POST.
I changed some things to the source (I'm not a web specialist but I know
that the changes I made are NOT correct: they were just to know if I
would be able to make it work), and I was able to get the correct feedback.
I made these changes to HTLine.c :
< static int num=0;
< num ++;
< if (num <=1) return HT_OK;
< HTRequest_setMethod(cl->request, METHOD_POST);
- - ---
> HTRequest_setMethod(cl->request, METHOD_GET);
The first change is the most stupid: I just added a counter to wait for
the second call to the terminate handler. The result is that
1 in case of a POST method the reply is received.
2 in case of just one call ComLine will never finish.
I know that a timeout would be much better but it was just an experiment.
The second change just make the -post flag do what it is intended for..
(as far as I can guess :-)
I would be really interested in a new release of ComLine that will fix this
"things" in a good way.
It would be really helpfull to my projects to get a way to interact with
Fabien Campagne -- email@example.com | Theoretical Chemistry
Dept. phone: (033) 83 91 20 00 extension 3236 | University of Nancy, France.
- ------- end -------
------- End of Forwarded Message
Henrik Frystyk Nielsen, <firstname.lastname@example.org>
World-Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA