Yang Tse | 1 Aug 2008 01:45
Picon

Re: danf: curl/lib http.c, 1.373, 1.374 http.h, 1.36, 1.37 transfer.c, 1.396, 1.397

Hi Dan,

You might have already oticed. But just in case...

With the factorization of Curl_copy_header_value it is also called in
transfer.c line #933 previous and outside of the '#ifndef
CURL_DISABLE_HTTP' in line #944. While in http.c the prototype falls
inside '#ifndef CURL_DISABLE_HTTP', as well as the implementation in
http.c.

Cheers,
-=[Yang]=-

Tiago Conceição | 1 Aug 2008 03:23
Picon
Favicon

RE: State of things for release?

> Tiago Conceição wrote:
>
> > like i say before, im new on libcurl. What can i use for check that
> > i know its a easy thing but i dont know how to make it.
>
> You can use a CURLOPT_HEADERFUNCTION with CURLOPT_NOBODY,
> and compare the information your header callback receives
> when the file exists, compared to when it does not exist.
>
> ( Or you can wait to see what Daniel finds when he gets
> time to look at the current behavior. )
>
> Also, if you are new to libcurl, i think you will find it is a lot easier
> to work out these problems with a simple command-line program
> written in standard C, instead of using a lot of C++ objects and
> functions that the rest of us might not have access to.
>
>
>
> - Jeff

actualy the objects i use not very hard to know what is/analize StrNew() is a str copy, StrFormat() its an sptrinf();
all the other code is normal and easy to understand (normal C)

a overwrite define for libcurl built in will easy very the things insted use extra code, it is not an application so i cant use callbacks to retrive data like that, i need a fast thing and all inside same function

Please consider CURLOPT_FTPOVERWRITE #define

thanks

Notícias direto do New York Times, gols do Lance, videocassetadas e muitos outros vídeos no MSN Videos! Confira já!
Dan Fandrich | 1 Aug 2008 03:46
Favicon

Re: danf: curl/lib http.c, 1.373, 1.374 http.h, 1.36, 1.37 transfer.c, 1.396, 1.397

On Fri, Aug 01, 2008 at 01:45:43AM +0200, Yang Tse wrote:
> You might have already oticed. But just in case...
> 
> With the factorization of Curl_copy_header_value it is also called in
> transfer.c line #933 previous and outside of the '#ifndef
> CURL_DISABLE_HTTP' in line #944. While in http.c the prototype falls
> inside '#ifndef CURL_DISABLE_HTTP', as well as the implementation in
> http.c.

Thanks for letting me know--I hadn't noticed the build logs. I've just
checked in a fix.

>>> Dan
--

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved

Pramod Sharma | 1 Aug 2008 06:12
Picon

Re: curl-library Digest, Vol 36, Issue 1


Message: 8
Date: Thu, 31 Jul 2008 15:54:36 -0700
From: Dan Fandrich <dan <at> coneharvesters.com>
Subject: Re: curl 7.18.1 proxy ipv6
To: curl-library <at> cool.haxx.se
Message-ID: <20080731225435.GA4953 <at> coneharvesters.com>
Content-Type: text/plain; charset=us-ascii

On Thu, Jul 31, 2008 at 01:29:16PM -0700, Dan Fandrich wrote:
> On Thu, Jul 31, 2008 at 05:27:40PM +0530, Pramod Sharma wrote:
> >     Output from my test program :
> >     * About to connect() to proxy 2001:db8:0:1:203:ffff:fee1:2a22 port 80 (#0)
> >     *   Trying 2001:db8:0:1:203:ffff:fee1:2a22... * connected
> >     * Connected to 2001:db8:0:1:203:ffff:fee1:2a22
> >     (2001:db8:0:1:203:ffff:fee1:2a22) port 80 (#0)
> >     * Server auth using Basic with user 'pramod'
> >     > GET ftp://2001:db8:0:1:203:ffff:fee1:2a22:21/SiteStat.xml HTTP/1.1
>
> Weird--the IPv6 brackets are removed here for some reason.  It turns out that
> a workaround is to remove the line setting CURLOPT_PORT.  Not only is port 21
> the default for ftp, but it's even included in the URL.  But it's still
> something that should be looked at.

I've checked in a fix for this problem, and a related one that affected
any FTP URL when CURLOPT_PORT was set.  There's actually another problem
related to this that isn't fixed (suffixes like ;type=A are stripped off)
that will have to be dealt with at a later time.

>>> Dan
--
 
Thanks Dan. As of know I will not use CULOPT_PORT to continue but will like to take that fix and merge it.
Can you please let me know in which file your fix is and if not big then what the fix was ?
 

 
Dan Fandrich | 1 Aug 2008 07:00
Favicon

Re: curl-library Digest, Vol 36, Issue 1

On Fri, Aug 01, 2008 at 09:42:29AM +0530, Pramod Sharma wrote:
> Thanks Dan. As of know I will not use CULOPT_PORT to continue but will like to
> take that fix and merge it.
> Can you please let me know in which file your fix is and if not big then what
> the fix was ?

The diff is here:
http://cool.haxx.se/cvs.cgi/curl/lib/url.c.diff?r1=1.723&r2=1.724

>>> Dan
--

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved

Kam | 1 Aug 2008 16:05
Picon

GET image after POST

I'm currently trying to write a program in C utilizing libcurl.

I'm using the Tamper Data and LiveHTTPheaders add-ons in firefox to see 
the HTTP headers being traded between my computer and a server. There is 
an initial GET to retrieve the cookies and PHPSESSID.

Next I POST with the desired form values which I retrieve from user 
input. Right after this POST I need to GET an image/gif file. The img 
src is located in the POST form and I don't know how to retrieve it and 
issue a GET at that URL. Firefox does this sequence automatically but I 
don't know how to program. Regexp and string searching is horrible in C 
so I'm trying to avoid that.

Here's a breakdown of what I have so far:

Issue a GET  <at>  URL: get cookies
Issue a POST: send needed form values
(Firefox issues a GET here at the URL within the next POST form, this is 
what I need)
------------------------------------------------------------------------

This is what the POST form looks like:
<form method=post action="http://siteaddress.com/web_message" 
name="challengeForm" onsubmit="return validate(this);">
<table style="margin-left: 75px;" border=1 cellpadding=0 cellspacing=0 
height=55 width=300 bgcolor=#CCCCCC
background="http://siteaddress.com/images/background.gif"><tr>
<td><img height=55 width=300 
src="http://siteaddress.com/unprot-bin/web_message.cgi?image=yes&fkey=~1217596520.8727.1422187.0&ServiceID=0119"></td>
</tr></table>
<p class=body style="margin-top:10px">
<table><tr valign=center><td valign=center class=body-bold>Enter Code 
Above:</td>
<td valign=center><input autocomplete="off" type=text name=chresp></td>
<td valign=center><input type=image
value="Submit" src="http://siteaddress.com/images/submit_button.gif"><input
type=hidden name=fkey value="~1217596520.8727.1422187.0"><input 
type=hidden name=ServiceID value="0119"></td>
</tr></table>
</p>
</form>

How does firefox automatically issue a GET for

http://siteaddress.com/unprot-bin/web_message.cgi?image=yes&fkey=~1217596520.8727.1422187.0&ServiceID=0119 
?
I tried using CURLOPT_FOLLOWLOCATION with no success. I just need the 
value of fkey from the above and then issue a GET at URL 
http://siteaddress.com/unprot-bin/web_message.cgi?image=yes%fkey=[FKEY 
VALUE]&ServiceID=0119

That's my logic so far.

Tor Arntsen | 1 Aug 2008 17:52
Picon
Favicon

Re: Solaris 10 autobuild and aclocal memory exhausted

Hi Yang,

On Thu, Jul 31, 2008 at 5:34 AM, Yang Tse <yangsita <at> gmail.com> wrote:
> If you could temporally downgrade GNU m4 1.4.10 down to 1.4.5 on the
> box running "Linux 2.6 x86-64 gcc 4.2.1" autobuild, this would give a
> theoretical similar scenario, that would at least give us a little bit
> more info to further pinpoint if that set of tool versions is the
> problem or if the problem only triggers on Solaris.
>
> Another idea Tor. Download m4 1.4.5 source code from
> ftp://ftp.gnu.org/gnu/m4/m4-1.4.5.tar.gz and build and test it for
> yourself.

I'm going to do this a bit later, I've been too busy today. However
I've got some news:

- I have rebooted the computer in question and released some allocated
memory and swap in the process. This has made more memory available
for the system, and the installed gm4 is now able to go through
without running out of memory. It appears to be eating up about 100MB
each time it goes through. Before the reboot it would exhaust the
available memory a bit before it got to that point (according to
vmstat). (The system has 512MB RAM).

- Which means that the upcoming autobuilds should go through, at least
over the weekend.

- There was still apparently lots of swap space available even before
the reboot, that didn't seem to avoid the resource problem though -
Solaris may be behaving a bit funny in these cases I assume.

- When I do more testing later on the memory usage by installing a
self-built gm4 on the Solaris computer-

- This probably wouldn't have failed on the x86-64 machine you
mentioned, even if the generic gm4 1.4.5 is buggy, as that machine has
16GB RAM installed.. plus 16GB swap. :-)

-Tor

Tor Arntsen | 1 Aug 2008 17:54
Picon
Favicon

Re: Solaris 10 autobuild and aclocal memory exhausted

On Fri, Aug 1, 2008 at 5:52 PM, Tor Arntsen <tor <at> spacetec.no> wrote:

> - When I do more testing later on the memory usage by installing a
> self-built gm4 on the Solaris computer-

Er, that got messed up.. I meant to say that I'll do more testing at a
later time, starting with a self-compiled gm4 1.4.5 on the Solaris
computer, and checking the memory usage compared to the blastwave
version and other gm4 versions as well.

-Tor

Michael Wood | 1 Aug 2008 18:10
Picon

Re: GET image after POST

On Fri, Aug 1, 2008 at 4:05 PM, Kam <kam.epi <at> gmail.com> wrote:
[...]
> <td><img height=55 width=300
> src="http://siteaddress.com/unprot-bin/web_message.cgi?image=yes&fkey=~1217596520.8727.1422187.0&ServiceID=0119"></td>
[...]
> How does firefox automatically issue a GET for
> http://siteaddress.com/unprot-bin/web_message.cgi?image=yes&fkey=~1217596520.8727.1422187.0&ServiceID=0119
> ?
[...]

Firefox has a builtin HTML parser :)

libcurl won't help you with that.  Either you're going to have to use
an HTML parsing library or use regular expressions or string matching.

There are many XML parsing libraries around.  Maybe one of them will work.

--

-- 
Michael Wood <esiotrot <at> gmail.com>

Yang Tse | 1 Aug 2008 19:55
Picon

Re: Solaris 10 autobuild and aclocal memory exhausted

2008/8/1, Tor Arntsen wrote:

> - I have rebooted the computer in question and released some allocated
> memory and swap in the process. This has made more memory available
> for the system, and the installed gm4 is now able to go through
> without running out of memory. It appears to be eating up about 100MB
> each time it goes through. Before the reboot it would exhaust the
> available memory a bit before it got to that point (according to
> vmstat). (The system has 512MB RAM).

Aha!. It had to be something. At least now there is a real bone to chew at.

> - There was still apparently lots of swap space available even before
> the reboot, that didn't seem to avoid the resource problem though -
> Solaris may be behaving a bit funny in these cases I assume.

Memory manager returning no memory available to perl or gm4 while it
swaps out and obviously program not retrying on memory allocation
failure ???

> I'll do more testing at a later time, starting with a self-compiled gm4 1.4.5
> on the Solaris computer, and checking the memory usage compared to
> the blastwave version and other gm4 versions as well.

If it is an OS or OS configuration issue, the blastwave version should
be the best one as it is supposed to be Solaris specific and might
'know' its internals. But don't leave the perl binary out of the
equation, it might be the real culprit, after all aclocal is a perl
script which executes autom4te which is another perl script which in
turn executes m4.

At least now we're on the right track.
--

-- 
-=[Yang]=-


Gmane