David Strauss | 18 May 2013 05:41
Gravatar

Interest in an Expat XML example?

Since there doesn't seem to be much interest in rolling the code I
wrote for WebDAV PROPFIND into core, I'd be happy to factor it as an
example. It was hard finding a good way to do XML stream parsing with
libcurl when I set out to write it. The method I used should be usable
for any XML.

--
David Strauss
   | david <at> davidstrauss.net
   | +1 512 577 5827 [mobile]
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Rodrigo | 17 May 2013 21:51
Picon

Modify cURL to store cookies in variable

Hello, my name is Rodrigo. I'm currently trying to make a PHP script
with cURL that needs to store cookies, I tried to use the "normal"
cookie file with CURLOPT_COOKIEJAR and CURLOPT_COOKIEFILE but I am using
parallel connections and need the cookie immediatly after the request
was made. I search a lot and noticed there isn't a standard way to store
cookies in variables, so I decided to try to modify cURL source to
implement this.

What I had in mind was to check how cookies where written to files with
CURLOPT_COOKIEJAR but instead of writing the cookies to files, returning
them so they could be stored in variables, I would like to do something
like this in PHP:

curl_setopt($handle, CURLOPT_COOKIEVAR, $cookie);

Where CURLOPT_COOKIEVAR would be the name of the option to store cookies
in variables and $cookie would store the cookie in a string.

So, my question is, any idea of where in cURL's source CURLOPT_COOKIEJAR
is implemented?

Thanks in advance.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

YAMADA Yasuharu | 17 May 2013 08:49

[PATCH] cookie path match fail

Hello cURL hackers,

I found a bug which cURL sends cookies to the path not to aim at.
For example:
- cURL sends a request to http://example.fake/hoge/
- server returns cookie which with path=/hoge;
  the point is there is NOT the '/' end of path string.
- cURL sends a request to http://example.fake/hogege/ with the cookie.

Because Curl_cookie_getlist() compares path using strncmp().

I think cURL should send without the cookie, this case.

An attached patch fixs this problem and test case.


Best regards,
thanks
===============
YAMADA Yasuharu
ACCESS CO., LTD.
Yasuharu.Yamada <at> access-company.com


. ________________________________________ The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mailer and delete this message and its attachments, if any. Thank you for your cooperation. ________________________________________
Attachment (cookie_path_match.diff): application/octet-stream, 1809 bytes
Attachment (test9010): application/octet-stream, 918 bytes
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Indtiny s | 17 May 2013 08:33
Picon

Read Certificates from curl

Hi ,
I have compiled curl with openssl  , now I need to read few variables from the certificates during handshake and validate them .
I need to read below cariables 
1. policy mapping 
2. All critical section 
3. Name constraints .

I need above vars from certificate and   validate . if validation fails against my requirement I have to reject the certificate . 
is it possible to do this from the curl side or I have to look in openssl only ? 

--Indra 
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Hu, Eric | 16 May 2013 17:34
Favicon

axtls memory leak

Hello,

 

In recent testing, a memory leak in lib/axtls.c was discovered.  In hindsight, it’s pretty obvious, but because it was such a small, slow leak, it was never noticed before.  In any case, here’s a patch.

 

I also got axTLS’s ability to use non-blocking connect and read calls working.  This was discussed long ago, but was dropped.  Should this be made to respect some user setting or preference?

 

Thanks,

Eric

Attachment (axtls-memleak.patch): application/octet-stream, 3498 bytes
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Brad Coish | 16 May 2013 16:32
Picon

Building libcurl on OpenVMS Alpha and Itanium

I'm trying to build libcurl libraries for OpenVMS (both Alpha and Itanium)
using latest available cURL sources (version 7.30.0 from http://curl.haxx.se).
The binary distribution works fine, but I need a C/C++ callable interface to
eliminate needless spawning of CURL.EXE.

I extracted the archive to my personal directory:

  DSA0:[BH.CURL_7_30_0]

Executing the <at> build_vms.com script from the [.PACKAGE.VMS] subdirectory
yields: 

  CC (opts) $1$DKC0:[BH.CURL-7_30_0.LIB]ASYN-ARES.C;1
  
  #include "config_vms.h"
  .^
  %CC-F-NOINCLFILEF, Cannot find file "config_vms.h" specified in
  #include directive.
  at line number 1438 in file
  $1$DKC0:[BH.curl-7_30_0.packages.vms.ALPHA]CURL_CONFIG.H;1

The config_vms.h was created but resides in DSA0:[BH.CURL-7_30_0].

As a work-around... I copied the config_vms.h file into the
[.PACKAGES.VMS.ALPHA] directory but the build then fails with:

  CC (opts) $1$DKC0:[BH.CURL-7_30_0.LIB]ASYN-ARES.C;1

  #include <gnutls/gnutls.h>
  .^
  %CC-F-NOINCLFILEF, Cannot find file <gnutls/gnutls.h> specified in #include directive.
  at line number 108 in file $1$DKC0:[BH.curl-7_30_0.lib]urldata.h;1

For my current needs I don't require SSL or TLS support.  I see from the
build_vms.com script that one could use NOSSL, however there is no option to
turn off GNUTLS (or any other possible GNU libraries)

I checked the archive and the last traffic circa Mar 2013 implies outstanding
problems with the VMS build had been addressed.  Any suggestions / guidance
would be appreciated.

-Brad

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Aldrich | 15 May 2013 06:46
Picon

Re: curl-library Digest, Vol 93, Issue 27

OK,I will try it.
在 2013-05-14二的 23:07 +0200,curl-library-request <at> cool.haxx.se写道:
> Send curl-library mailing list submissions to
> 	curl-library <at> cool.haxx.se
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-library
> or, via email, send a message with subject or body 'help' to
> 	curl-library-request <at> cool.haxx.se
> 
> You can reach the person managing the list at
> 	curl-library-owner <at> cool.haxx.se
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of curl-library digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: FTP upload stall? (Daniel Stenberg)
>    2. Re: site contents now off git (Nick Zitzmann)
>    3. AW: site contents now off git
>       (Alexander.Elgert <at> external.t-systems.com)
>    4. Re: how curl get access_token in OAuth? (David Strauss)
>    5. AW: Re: IMAP and POP3 with libcurl 7.30 (1xyzzyx1)
>    6. RE: Re: IMAP and POP3 with libcurl 7.30 (Steve Holme)
>    7. Re: FTP upload stall? (Sam Deane)
>    8. Re: site contents now off git (Daniel Stenberg)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 14 May 2013 18:18:13 +0200 (CEST)
> From: Daniel Stenberg <daniel <at> haxx.se>
> To: libcurl development <curl-library <at> cool.haxx.se>
> Subject: Re: FTP upload stall?
> Message-ID: <alpine.DEB.2.00.1305141814360.8869 <at> tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
> 
> On Mon, 13 May 2013, Sam Deane wrote:
> 
> > We've been getting a problem with our unit tests where FTP uploads using 
> > curl_multi were stalling.
> 
> Multi or easy makes no difference internally these days!
> 
> > The test in question starts off three uploads and three downloads to the 
> > same server in parallel. Unless we're somehow missing an error condition 
> > somewhere, it looks like all the uploads hang.
> 
> Are you using active FTP? Does the problem require these three 
> uploads/downloads to trigger? Do all the uploads hang at the same spot in the 
> transfer, and if so where exactly is that?
> 
> > I seem to have tracked this down to commit 57aeabcc1a2
> 
> I don't understand how this waiting for an additional socket (that the commit 
> introduced) can cause a hang like that! Can you?
> 
> -- 
> 
>   / daniel.haxx.se
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Tue, 14 May 2013 11:22:05 -0600
> From: Nick Zitzmann <nick <at> chronosnet.com>
> To: libcurl development <curl-library <at> cool.haxx.se>
> Subject: Re: site contents now off git
> Message-ID: <AAF15602-8C95-460D-9143-CB120C5CFC82 <at> chronosnet.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 
> On May 13, 2013, at 11:44 AM, Daniel Stenberg <daniel <at> haxx.se> wrote:
> 
> > Hi all,
> > 
> > I've just switched the web site to now update its contents automatically from this git repository: https://github.com/bagder/curl-www
> > 
> > Please point out any problems you encounter as I'm sure there are some flaws left due to this transition.
> 
> Question: How do we make it? It looks like it uses a makefile to generate the HTML, but when I run make, I get this:
> 
> ===
> % make
> make: gnudate: Command not found
> preprocessing sflogo.html
> i686-apple-darwin11-llvm-gcc-4.2: '-V' must come at the start of the command line
> make: *** [sflogo.html] Error 1
> ===
> 
> Nick Zitzmann
> <http://www.chronosnet.com/>
> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Tue, 14 May 2013 19:41:48 +0200
> From: <Alexander.Elgert <at> external.t-systems.com>
> To: <curl-library <at> cool.haxx.se>
> Subject: AW: site contents now off git
> Message-ID:
> 	<DE3E901B104957409FFC4EA8DCE5B0A5018FEE628123 <at> HE113566.emea1.cds.t-internal.com>
> 	
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Seems to be the gnu version of date, which is able to do this:
> 
> $ date +'-D__TODAY__=%B %e, %Y'
> -D__TODAY__=Mai 14, 2013
> 
> Maybe the makefile is written on solaris, where the option does not work with the normal date binary.
> 
> --
> Deutsche Telekom AG
> Seamless ICT Security Infrastructure & Management
> im Auftrag T-Systems International GmbH
> Dipl. Inf Alexander Elgert
> Langwadener Strasse 17
> 64625 Bensheim
> +49 176 22 717 661 (Mobil)
> +49 671 83419-12 (Tel)
> +49 671 83419-30 (Fax)
> E-Mail: alexander.elgert <at> gmx.de
> 
> -----Urspr?ngliche Nachricht-----
> Von: curl-library [mailto:curl-library-bounces <at> cool.haxx.se] Im Auftrag von Nick Zitzmann
> Gesendet: Dienstag, 14. Mai 2013 19:22
> An: libcurl development
> Betreff: Re: site contents now off git
> 
> 
> On May 13, 2013, at 11:44 AM, Daniel Stenberg <daniel <at> haxx.se> wrote:
> 
> > Hi all,
> > 
> > I've just switched the web site to now update its contents automatically from this git repository: https://github.com/bagder/curl-www
> > 
> > Please point out any problems you encounter as I'm sure there are some flaws left due to this transition.
> 
> Question: How do we make it? It looks like it uses a makefile to generate the HTML, but when I run make, I get this:
> 
> ===
> % make
> make: gnudate: Command not found
> preprocessing sflogo.html
> i686-apple-darwin11-llvm-gcc-4.2: '-V' must come at the start of the command line
> make: *** [sflogo.html] Error 1
> ===
> 
> Nick Zitzmann
> <http://www.chronosnet.com/>
> 
> 
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:  http://curl.haxx.se/mail/etiquette.html
> 
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Tue, 14 May 2013 11:21:22 -0700
> From: David Strauss <david <at> davidstrauss.net>
> To: libcurl development <curl-library <at> cool.haxx.se>
> Subject: Re: how curl get access_token in OAuth?
> Message-ID:
> 	<CAKz8sYUhPGX6+dFSbghw4pLfBD37rPWkjHvrGx1yStUC-rH8+g <at> mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> First, this [1] is the library I prefer for OAuth. You can either use
> it directly (easier) or in conjunction with libcurl.
> 
> On Mon, May 13, 2013 at 5:10 PM, Feng Helong <fenghelongnjit <at> gmail.com> wrote:
> > So my question is how can I use curl to get the access_token in the url of
> > the new webpage.
> 
> I think you want something like curl_easy_getinfo() with
> CURLINFO_EFFECTIVE_URL [2]
> 
> [1] http://liboauth.sourceforge.net/
> [2] http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html
> 
> --
> David Strauss
>    | david <at> davidstrauss.net
>    | +1 512 577 5827 [mobile]
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Tue, 14 May 2013 20:33:58 +0200
> From: 1xyzzyx1 <1xyzzyx1 <at> gmx.de>
> To: curl-library <at> cool.haxx.se
> Subject: AW: Re: IMAP and POP3 with libcurl 7.30
> Message-ID: <ejxm2xo4ikct53eu92gycj3p.1368556438217 <at> email.android.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Hello,?
> thanks so far, but that was not quite a solution for me. Did anyone really test it? My evidence is quite good
or not?
> 
> Or what could have went wrong during compiling the lib? But the version output is also quite astonishing if
it would not be the real 7.30 version.
> 
> Any further help is very welcome.
> Thanks in advance.
> xyzzyx.
> 
> -------- Original message --------
> Subject: Re: IMAP and POP3 with libcurl 7.30 
> From: David Strauss <david <at> davidstrauss.net> 
> To: libcurl development <curl-library <at> cool.haxx.se> 
> CC:  
> 
> On Sun, May 12, 2013 at 8:37 AM, xyzzyx <1xyzzyx1 <at> gmx.de> wrote:
> > because it seems so for us that the new IMAP functions are only working in
> > the command line curl and not with the libcurl functions.
> 
> While I don't have the experience using libcurl with IMAP to help you
> directly here, I can say that the command-line curl uses libcurl. If
> something is possible with the curl CLI, it's possible with libcurl.
> 
> There are a couple of cases where the curl CLI provides additional
> logic, like HTTP retries, on top of libcurl. But, it's never redundant
> with what libcurl provides itself.
> 
> --
> David Strauss
> ?? | david <at> davidstrauss.net
> ?? | +1 512 577 5827 [mobile]
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette:? http://curl.haxx.se/mail/etiquette.html
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://cool.haxx.se/pipermail/curl-library/attachments/20130514/14220c98/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 6
> Date: Tue, 14 May 2013 21:10:09 +0100
> From: Steve Holme <steve_holme <at> hotmail.com>
> To: "'libcurl development'" <curl-library <at> cool.haxx.se>
> Subject: RE: Re: IMAP and POP3 with libcurl 7.30
> Message-ID: <DUB402-EAS54B65D054947F37F0F719382A10 <at> phx.gbl>
> Content-Type: text/plain; charset="UTF-8"
> 
> Hi,
> 
> On Tue, 14 May 2013, 1xyzzyx1 wrote:
> 
> > thanks so far, but that was not quite a solution for me. Did
> > anyone really test it? My evidence is quite good or not?
> 
> Firstly, please do not top post.
> 
> This is unfortunately a very quick reply as I don't have much time at the moment :( but I didn't want you to
feel that you were being ignored here.
> 
> You will have noticed that the IMAP functionality whilst has been around for some time now only really
became useful in curl / libcurl v7.30 and as such is very, very, very new - it really is in its infancy and may
require more work to fully become usable. To a certain degree there were quite a number of issues (bugs and
missing functionality) in both SMTP and POP3 as these two email protocols hadn't been used in anger until
more recently. 
> 
> As David has already mentioned the curl command line tool uses libcurl underneath so by virtue the code
works - however the interface may not work how you expect and unfortunately I still haven't found the time
to write my own IMAP module using libcurl yet :(
> 
> > Or what could have went wrong during compiling the lib? But
> > the version output is also quite astonishing if it would not be
> > the real 7.30 version.
> 
> Please note that CURLOPT_HEADER is not used by the email protocols and in order to control what the IMAP
server gives you back in a FETCH request you need to specify what SECTION you want (such as HEADER, TEXT,
etc...) in the URL. Please see the IMAP section of CURLOPT_URL in
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html for more details.
> 
> Also please note that the IMAP connection will be closed down when curl exits whereas you might be issuing
several requests to libcurl in your own application - unless you specify several URL's to the curl CLI that
may not be a fair comparison and whilst we have tried to test the new code with limited resources there may
still be bugs that prevent another application behaving exactly the same as curl.
> 
> I would recommend reading the IMAP RFC (RFC-3501) and you might also like to take a look at some of the test
cases (tests 800 to 809 in tests/data) to use as reference of what data can be returned from an IMAP server
using curl and libcurl.
> 
> Please also bare in mind that whilst I know SMTP and POP3 inside and out I am still learning the IMAP protocol
myself - which as you will have noticed is far more complex that POP3 so I am no expert at present :(
> 
> Sorry if this doesn't help too much but unfortunately the first few users of libcurl's IMAP interface are
really going to be the guinea pigs so to speak, but please feel free to get involved / contribute / provide
feedback / make suggestions / make improvements / provide bug fixes and maybe we can get libcurl's IMAP
support to a level comparable with POP3 and SMTP ;-)
> 
> Kind Regards
> 
> Steve
> 
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Tue, 14 May 2013 21:33:19 +0100
> From: Sam Deane <sam <at> elegantchaos.com>
> To: libcurl development <curl-library <at> cool.haxx.se>
> Subject: Re: FTP upload stall?
> Message-ID: <B113B759-C597-487B-A434-4F940A0B1718 <at> elegantchaos.com>
> Content-Type: text/plain; charset=us-ascii
> 
> On 14 May 2013, at 17:18, Daniel Stenberg <daniel <at> haxx.se> wrote:
> 
> >> We've been getting a problem with our unit tests where FTP uploads using curl_multi were stalling.
> > 
> > Multi or easy makes no difference internally these days!
> 
> Good point.
> 
> Our layer on top (https://github.com/karelia/ConnectionKit incidentally) has an option to do things
either synchronously or asynchronously, which for FTP essentially boils down to using curl_easy or curl_multi.
> 
> If we use the synchronous one, we don't get the stall. But then we're not doing things in parallel in that
situation, so it's not really a fair comparison.
> 
> 
> >> The test in question starts off three uploads and three downloads to the same server in parallel. Unless
we're somehow missing an error condition somewhere, it looks like all the uploads hang.
> > 
> > Are you using active FTP? Does the problem require these three uploads/downloads to trigger? Do all the
uploads hang at the same spot in the transfer, and if so where exactly is that?
> 
> Passive I think. I'll have to go back and verify the answers to the other questions, but I think that they are
no, and yes respectively!
> 
> There's a report of the stalls in some discussion here:
> 
> https://github.com/karelia/ConnectionKit/commit/a3b69c2160a205312259c6b338ae305fdf8383d5#commitcomment-3210475
> 
> and in that case it seems to be:
> 
> 2013-05-14 19:34:26.223 Orbitink[73606:5c1b] TYPE I
> 2013-05-14 19:34:26.223 Orbitink[73606:5c1b] FTP 0x10087bd10 (line 3594) state change from STOP to STOR_TYPE
> 2013-05-14 19:34:26.296 Orbitink[73606:5c1b] 200 Switching to Binary mode.
> 2013-05-14 19:34:26.296 Orbitink[73606:5c1b] STOR index.html
> 2013-05-14 19:34:26.296 Orbitink[73606:5c1b] FTP 0x10087bd10 (line 1701) state change from
STOR_TYPE to STOR
> 
> 
> which does look like the right sort of place. 
> 
> However, that thread is actually contradicting my claim that reverting your commit fixed it - so it may be a
red herring, or there may be other things going on.
> 
> 
> >> I seem to have tracked this down to commit 57aeabcc1a2
> > 
> > I don't understand how this waiting for an additional socket (that the commit introduced) can cause a
hang like that! Can you?
> 
> I have to confess that I've not traced the code through at the libcurl level yet. 
> 
> I just did a kind of manual git bisect to find the point where the stall started happening, and it came down to
that commit.
> 
> 
> 
> 
> ------------------------------
> 
> Message: 8
> Date: Tue, 14 May 2013 23:07:32 +0200 (CEST)
> From: Daniel Stenberg <daniel <at> haxx.se>
> To: libcurl development <curl-library <at> cool.haxx.se>
> Subject: Re: site contents now off git
> Message-ID: <alpine.DEB.2.00.1305142257150.9341 <at> tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
> 
> On Tue, 14 May 2013, Nick Zitzmann wrote:
> 
> >> I've just switched the web site to now update its contents automatically 
> >> from this git repository: https://github.com/bagder/curl-www
> >
> > Question: How do we make it? It looks like it uses a makefile to generate 
> > the HTML
> 
> Yeah. I haven't gotten around to documenting the process. It is an old system 
> and not very pretty - and yes it started out on a Solaris box back in the 
> stone age. But it works!
> 
> The 'cpp' used in the makefiles is this version: 
> http://daniel.haxx.se/projects/fcpp/ - It is basically a C preprocessor hacked 
> to get a few additional features.
> 
> 'gnudate' is the GNU date command implementation. (I just symlink to the 
> /bin/date version on Linux)
> 
> I put both in a separate directory that I add to the $PATH when I want to run 
> make in the curl docroot.
> 
> There's some additional tools as well, but they might be slightly less 
> "crazy".
> 

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
1xyzzyx1 | 14 May 2013 20:33
Picon
Picon

AW: Re: IMAP and POP3 with libcurl 7.30

Hello, 
thanks so far, but that was not quite a solution for me. Did anyone really test it? My evidence is quite good or not?

Or what could have went wrong during compiling the lib? But the version output is also quite astonishing if it would not be the real 7.30 version.

Any further help is very welcome.
Thanks in advance.
xyzzyx.



-------- Original message --------
Subject: Re: IMAP and POP3 with libcurl 7.30
From: David Strauss <david <at> davidstrauss.net>
To: libcurl development <curl-library <at> cool.haxx.se>
CC:


On Sun, May 12, 2013 at 8:37 AM, xyzzyx <1xyzzyx1 <at> gmx.de> wrote:
> because it seems so for us that the new IMAP functions are only working in
> the command line curl and not with the libcurl functions.

While I don't have the experience using libcurl with IMAP to help you
directly here, I can say that the command-line curl uses libcurl. If
something is possible with the curl CLI, it's possible with libcurl.

There are a couple of cases where the curl CLI provides additional
logic, like HTTP retries, on top of libcurl. But, it's never redundant
with what libcurl provides itself.

--
David Strauss
   | david <at> davidstrauss.net
   | +1 512 577 5827 [mobile]
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Feng Helong | 14 May 2013 02:10
Picon

how curl get access_token in OAuth?

I want to write third party application,I use c and curl,first,and my application is desktop application without server.First,I POST a request,then the server send me back a webpage,users should enter their username and password,if everything is ok,the webpage will redirect to a new webpage,and the access_token will be appended at the end of the url of the new webpage.So my question is how can I use curl to get the access_token in the url of the new webpage.Thank you.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Thomas Mayer | 13 May 2013 22:13
Favicon
Gravatar

Question about cacert.pem on Windows with MinGW

Hello,

I am developping a library for Puredata to make RESTful web requests.

Everything is working quite well with libcurl, but I have a problem
using SSL secured requests in Windows.

I am cross compiling libcurl on Linux using MXE, but I get SSL errors
when setting the path to the cacert.pem from the library.

This is what I have tried:
I am setting the cacert path using

curl_easy_setopt(curl_handle, CURLOPT_SSLCERT, common->cert_path);

where common->cert_path is char[2048] (not a pointer, just for testing)
and is C:/Program Files (x86)/pd/extra/purest_json/cacert.pem

cacert.pem is the download from http://curl.haxx.se/docs/caextract.html,
and I have set read/write access to everyone, I have already tried
replacing slashes with backslashes.

Here are the configure scripts from MXE that I have tried and the error
codes:

gnutls:
-------
./configure \
        --host='$(TARGET)' \
        --build="`config.guess`" \
        --disable-shared \
        --prefix='$(PREFIX)/$(TARGET)' \
        --with-gnutls \
        --without-ssl \
        --with-libidn \
        --enable-sspi \
        --enable-ipv6 \
        --with-libssh2

error code: CURLE_SSL_CACERT_BADFILE (77)

openssl:
--------
./configure \
        --host='$(TARGET)' \
        --build="`config.guess`" \
        --disable-shared \
        --prefix='$(PREFIX)/$(TARGET)' \
        --without-gnutls \
        --with-ssl \
        --with-libidn \
        --enable-sspi \
        --enable-ipv6 \
        --with-libssh2

error code: CURLE_SSL_CERTPROBLEM (58)

My C code for using libcurl is at
https://github.com/residuum/PuRestJson/blob/master/ctw.c

Thanks for you help,
Thomas
--

-- 
"As long as people kept worrying that the machines were taking over,
they wouldn't notice what was really happening. Which was that the
programmers were taking over." (Robert Anton Wilson - The Homing Pidgeons)
http://www.residuum.org/
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Daniel Stenberg | 13 May 2013 19:44
Picon
Favicon
Gravatar

site contents now off git

Hi all,

I've just switched the web site to now update its contents automatically from 
this git repository: https://github.com/bagder/curl-www

Please point out any problems you encounter as I'm sure there are some flaws 
left due to this transition.

--

-- 

  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html


Gmane