cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl tests for the test suite

From: Sanjeev <sunaditya1_at_yahoo.com>
Date: Thu, 19 Dec 2002 22:55:13 -0800 (PST)

> I think you should first clearly state why we would
> like this in the curl
> code. What does it do? What's the benefits? And
> perpaps importantly, what's
> the problem with keeping this an application that
> simply *uses* libcurl?

Yes Sir!

   Since cURL is a great package which can also be
used for scripting, ( often unattended.) there might
arise a need for a user often to submit web
pages blindly ( i mean unattended mode ).

Example being, in one of the mails, i sent a form
based html page, which has a pulldown menu, on
selecting a particular menu, the page diplays
altogether, a different form.

Here i dont know, what are the fields of the form.
I only know onething, for every form there are two
*MUST* fields in common which i should fill in.

What i'm unaware of in this situation is that, what
are the other *MUST* fields, without which the page
cannot be submitted.

In this situation, if it happened like, i get a
list of all the form fields (MUST/or not), i will
try to fill in some rubbish data in those fields,
before i could submit the form successfully,
without getting it back asking to fill in the
required fields!

Ofcourse, such situations may be very rare!

So, for my job to get done, the parser i wrote helped
me. with the WRITEFUNCTION callback, i passed the data
to this parser which then stored
all the fields in a struct. ( one good thing for
me which helped is that, the forms i get
dynamically are not much complicated ).

I should shamelessly commit that, before starting
with curl package, i've gone through your
http://curl.haxx.se/libcurl/competitors.html
and thought to use libwww ( didn't try
though ) thinking that it will help parsing also.
comparing the simplicity with that of curl, i
stuck to cURL.

> That library is LGPL'ed, so you better not use
code
> from it if you think of
> providing code for inclusion within curl.
> It is not. curl does not do HTML parsing, and it
> uses a license that I don't
> want used inside curl.
 
I'm not using that library sir! I started All of a
fresh! i just took the idea of approach from that
package! and did in similiar style.

except a very few about( 3 to 4 ) statements like
   if( *source != '/' && *source != '!'
                     && !isspace((int)*(source)) )
remaining coding is all of my own.

Its my bad luck if L'GPL covers the 'ideas of
approach' also.

If above sounds Ok for you, please take a look at
the modified parse.c file i attached below. ( I
took out few major bugs and customized the struct
from yesterday's file. )

--------------------------------------------------
Updated curl from cvs and could
successfully compile/make/test.
All tests are successfull except 100 for first time.
under tests dir, i ran the command
'./runtests.pl -v 100' a hundred times, but all other
times, it reported Ok.
Again i deleted whole package and built it from
first and ran the command
'./runtests.pl -v' but NO RESULT!! This time also
test100 is successfully.
From now on I will try 'runtests.pl -v' instead
of make test. And guess if we can get to the
root of it!

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-------------------------------------------------------
This SF.NET email is sponsored by: Geek Gift Procrastinating?
Get the perfect geek gift now! Before the Holidays pass you by.
T H I N K G E E K . C O M http://www.thinkgeek.com/sf/

  • application/octet-stream attachment: parse.c
Received on 2002-12-20