curl-library
Re: bad post strings?
Date: Mon, 04 Jun 2001 15:21:06 -0500
I tried your suggestion, here is the output I get...
[root_at_vain lib]# gcc -DHAVE_CONFIG_H -I../ -g -D_FORM_DEBUG -o
formdata -I../include formdata.c
/tmp/ccbpnrPR.o: In function `FormParse':
/root/curl-7.7.3/lib/formdata.c:204: undefined reference to
`curl_strequal'
/tmp/ccbpnrPR.o: In function `Curl_getFormData':
/root/curl-7.7.3/lib/formdata.c:502: undefined reference to
`curl_strequal'
/tmp/ccbpnrPR.o: In function `main':
/root/curl-7.7.3/lib/formdata.c:637: undefined reference to `FormInit'
/root/curl-7.7.3/lib/formdata.c:639: undefined reference to `FormReader'
collect2: ld returned 1 exit status
also, in my write to memory function... I find that the (char *)ptr
string is 2 char longer with strlen(ptr) than with (size * nmemb).
i get these warnings while compiling my app:
[root_at_vain cmECF]# make -f cmECF2_make
gcc -c -g cmECF2.cpp
gcc -L/home/dast/lib -L/usr/local/ssl/lib -lcurl -lnsl -lssl -lcrypto
-dl -o cmECF2 cmECF2.o
/usr/bin/ld: warning: libssl.so.0, needed by
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libcurl.so, may
conflict with libssl.so.1
/usr/bin/ld: warning: libcrypto.so.0, needed by
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libcurl.so, may
conflict with libcrypto.so.1
jb
Daniel Stenberg wrote:
>
> On Sun, 3 Jun 2001, John Baxter wrote:
>
> > while using libcurl 7.7.3-1 on linux 2.4.2-2 (rh7.1) i loop performing
> > multiple rfc-1867 posts to return the results of a query. i create and
> > destroy a list with formparse(). some of the posts result in an error
> > from the server saying my post is invalid. the server responds with my
> > post value with junk appended to my intented post value. the bad values
> > have my post string followed by "curl" which is followed by junk. ex:
> > "99-10013curlcnc9d89refkrehfy" where "99-10013" is the value I intended> > to post. I perform a printf(post->contents) prior to curl_easy_perform()
> > and is is always correct at that point. any ideas?
>
> (I also just replied to the bug report in this subject.)
>
> Is the 'post' and 'last' pointers really set to NULL before you use
> curl_formparse() the first time? If they're not, this might very well be an
> explanation to why junk ends up in the list.
>
> If that is not the problem, I suggest that you compile lib/formdata.c with
> _FORM_DEBUG defined and have a go at fixing a test that passes the exact same
> set of form data as you do in your program. Then you can run that test
> program and see what kind of output you get. If it looks ok, the problem is
> in your code, if it still looks weirdo, then libcurl is to blame and I'd
> appriciate you telling me exactly how to repeat it!
>
> --
> Daniel Stenberg -- curl dude -- http://curl.haxx.se/
>
> _______________________________________________
> Curl-library mailing list
> Curl-library_at_lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/curl-library
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-06-05