Daniel Stenberg | 1 Nov 11:05 2007
Picon

Re: SCP Breaks after some KB

On Wed, 31 Oct 2007, Gavrie Philipson wrote:

> I followed your suggestion, and ran the 'scp' and 'scp_nonblock' examples.
>
> The 'scp' example works on a small file, but fails on a big one (6 MB):

[...]

> The 'scp_nonblock' example hangs after a while:

This then of course suggests that the problem is within libssh2, so I suggest 
this:

#1 - try the latest libssh2 snapshot/CVS and see if the bugs remain

#2 - if they do, take this issue over to the libssh2-devel mailing list and
      try to get it sorted

--

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Mustafa Cayci | 1 Nov 12:59 2007
Picon

Post a XML file to a servlet using Curl

Hi,

I am using the following command to post to a servlet

C:\curl-7.17.1>curl -d C:\curl-7.17.1\identify_GES_F_NoAmp_fpset6_053007_TC48B.xml -H
"Content-Type: text/xml" http://localhost:8888/dptoaqservlet/dptoaqservlet

The servlet does not have a form. Do you see anything wrong with this? I see my message but the file size is 0.

Thanks in advance,

Mustafa

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mustafa Cayci | 1 Nov 13:56 2007
Picon

Re: Post a XML file to a servlet using Curl

Hi,

I figured it out that I was not using " <at> " in front of my file name.

Mustafa

----- Original Message ----
From: Mustafa Cayci <acayci <at> yahoo.com>
To: curl-users <at> cool.haxx.se
Sent: Thursday, November 1, 2007 7:59:06 AM
Subject: Post a XML file to a servlet using Curl

Hi,

I am using the following command to post to a servlet

C:\curl-7.17.1>curl -d
 C:\curl-7.17.1\identify_GES_F_NoAmp_fpset6_053007_TC48B.xml -H "Content-Type: text/xml"
 http://localhost:8888/dptoaqservlet/dptoaqservlet

The servlet does not have a form. Do you see anything wrong with this?
 I see my message but the file size is 0.

Thanks in advance,

Mustafa

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
(Continue reading)

Gisle Vanem | 1 Nov 15:58 2007
Picon

Calling convention

As it is now all applications using libcurl (either dynamically or 
the static lib) must be built with the same calling convention as
libcurl was built with. Normally this would be 'cdecl' (which is
implicit and the only (?) possible calling-convention in gcc).

Sometimes mixing e.g. 'fastcall', 'stdcall' and 'cdecl' would be 
useful. I guess this would be an issue only on Windows and DOS
using non-gcc compilers.

But this would mean we should declare the calling-convention on
all public libcurl functions and function-pointer types. 
E.g. in <curl/curl.h>:

#if !defined(CURL_CCONV)  
#if (defined(__WATCOMC__) || defined(_MSC_VER))
#define CURL_CCONV  __fastcall   /* or __cdecl */
#else
#define CURL_CCONV
#endif
#endif
...
typedef int (*CURL_CCONV curl_sockopt_callback)(void *clientp,
                                                        curl_socket_t curlfd,
                                                        curlsocktype purpose);
...
CURL_EXTERN CURLcode CURL_CCONV curl_global_init(long flags);
...

Should we proceed with this idea? Any comments on the pros and cons.

(Continue reading)

Brian Dessent | 1 Nov 16:20 2007
Picon

Re: Calling convention

[ shouldn't this be on the curl-library <at>  list? ]

Gisle Vanem wrote:

> As it is now all applications using libcurl (either dynamically or
> the static lib) must be built with the same calling convention as
> libcurl was built with. Normally this would be 'cdecl' (which is
> implicit and the only (?) possible calling-convention in gcc).
> 
> Sometimes mixing e.g. 'fastcall', 'stdcall' and 'cdecl' would be
> useful. I guess this would be an issue only on Windows and DOS
> using non-gcc compilers.

I don't know why you exclude gcc here, as it fully supports all of those
calling conventions on Windows (i.e. Cygwin and MinGW.)  In fact the
entire Win32 API uses the stdcall calling convention (aka WINAPI in the
headers) which means it's a requirement that a compiler support this in
order to do anything non-trivial on Win32.

> Should we proceed with this idea? Any comments on the pros and cons.

Frankly it sounds like a horrible idea.  Library versioning is already
tricky enough that I don't see why you'd want to intentionally muddy the
waters further by making it easier to produce a DLL that's incompatible
-- especially on a platform where users are accustomed to using someone
else's build rather than building from source.  There's already enough
problems with people that can't figure out how to choose the right
MT/ST/static/dynamic version of the MSVCRT that adding yet another
variable to the ABI matrix just seems like asking for trouble.

(Continue reading)

Justin Works | 1 Nov 17:48 2007
Picon

Command works from CMD but not from .bat

This is my first post to the mailing list, so if, despite reading the
Mailing List  Etiquette I still managed to mess up -- sorry. Anyway,
I'm having a small issue with command line utility 7.17.1

I'm getting a very strange result. If I go to start --> run --> CMD
and then at the command prompt enter my curl command as this:

curl "http://hprc.ncqa.org/Result.asp" -e
"http://hprc.ncqa.org/search.asp" -d
"txtAreaCode=&lstStates=CA&txtZipCode=&txtPlanName=&rdoProductLine=All&rdoReportingProduct=HMO%2FPOS&SUBMIT1.x=34&SUBMIT1.y=11"
-o "c:\test2.txt"

I get out 86KB of data with full results.

If I put the exact same command in a .bat file and call it test.bat
and run this from windows explorer I get out a file, but it is now 6KB
and doesn't contain anything but one javascript function code from the
web page.

Any ideas?

Dan Fandrich | 1 Nov 18:09 2007

Re: Command works from CMD but not from .bat

On Thu, Nov 01, 2007 at 09:48:31AM -0700, Justin Works wrote:
> I'm getting a very strange result. If I go to start --> run --> CMD
> and then at the command prompt enter my curl command as this:
> 
> curl "http://hprc.ncqa.org/Result.asp" -e
> "http://hprc.ncqa.org/search.asp" -d
> "txtAreaCode=&lstStates=CA&txtZipCode=&txtPlanName=&rdoProductLine=All&rdoReportingProduct=HMO%2FPOS&SUBMIT1.x=34&SUBMIT1.y=11"
> -o "c:\test2.txt"
> 
> I get out 86KB of data with full results.
> 
> If I put the exact same command in a .bat file and call it test.bat
> and run this from windows explorer I get out a file, but it is now 6KB
> and doesn't contain anything but one javascript function code from the
> web page.
> 
> Any ideas?

The % character is special in a batch file--you need to double them to
pass it to curl.

>>> Dan
--

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

Justin Works | 1 Nov 18:35 2007
Picon

Re: Command works from CMD but not from .bat

On 11/1/07, Dan Fandrich <dan <at> coneharvesters.com> wrote:
> On Thu, Nov 01, 2007 at 09:48:31AM -0700, Justin Works wrote:
> > I'm getting a very strange result. If I go to start --> run --> CMD
> > and then at the command prompt enter my curl command as this:
> >
> > curl "http://hprc.ncqa.org/Result.asp" -e
> > "http://hprc.ncqa.org/search.asp" -d
> > "txtAreaCode=&lstStates=CA&txtZipCode=&txtPlanName=&rdoProductLine=All&rdoReportingProduct=HMO%2FPOS&SUBMIT1.x=34&SUBMIT1.y=11"
> > -o "c:\test2.txt"
> >
> > I get out 86KB of data with full results.
> >
> > If I put the exact same command in a .bat file and call it test.bat
> > and run this from windows explorer I get out a file, but it is now 6KB
> > and doesn't contain anything but one javascript function code from the
> > web page.
> >
> > Any ideas?
>
> The % character is special in a batch file--you need to double them to
> pass it to curl.
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com              The web change of address service
>           Let webmasters know that your web site has moved
>
That did the trick. Thank you!

(Continue reading)

danielkun | 2 Nov 04:32 2007

Why is curl_easy_perform() outputting "1" to the console?


Hello,

This may be a rather easy question but I can't seem to figure it out.
Why is curl_easy_perform() outputting '1' to the console each time its
called?

(I'm running it on debian linux and I'll include current code just in
case)

Thank you,
Daniel

void
SendConf(char* tid, const char* cmdSvr)
{
	CURL	*curl;
	FILE	*fp;
	char	URL[128];
	char	postfields[256] = "";
	int	linePointer = 0;
	char	line[128] = "";
	char	confData[1024] = "";

	fp = fopen(CONF_PATH, "r");

	if (NULL == fp){
		printf("failed to open the configuration file at SendConf()\n");
	} else {
		while( fgets(line, sizeof(line) - 1, fp) != NULL ) {
(Continue reading)

Dan Fandrich | 2 Nov 06:23 2007

Re: Why is curl_easy_perform() outputting "1" to the console?

On Thu, Nov 01, 2007 at 08:32:15PM -0700, danielkun <at> iremo.com wrote:
> This may be a rather easy question but I can't seem to figure it out.
> Why is curl_easy_perform() outputting '1' to the console each time its
> called?

Where else is it supposed to write the '1'?  Seriously, libcurl writes the
output from the remote server to stdout unless you tell it otherwise, so
my guess is the server is sending 1 after your form is successfully posted.
You probably want to install a write callback handler to do something else
with the result.

>>> Dan
--

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


Gmane