Curl plugin problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Curl plugin problems

Lukas Renggli
Anything that goes beyond a basic up or download leads to a primitive failure:

    Curl new
        url: 'http://somedomain.com/foo';
        request: 'DELETE';  "<-- primitive error here"
        perform

In the debugger #easyStatusString returns 'no error'.

Even

   Curl curlVersion

gives a primitive failure.

Any idea what I am doing wrong?

I am using the plugin that comes shipped with the latest Mac VM.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

johnmci
MMm the curlplugin is oh what 3 year, 6 months old. I guess interest means compiling up a new one.

On 2010-02-01, at 12:03 AM, Lukas Renggli wrote:

> Anything that goes beyond a basic up or download leads to a primitive failure:
>
>    Curl new
>        url: 'http://somedomain.com/foo';
>        request: 'DELETE';  "<-- primitive error here"
>        perform
>
> In the debugger #easyStatusString returns 'no error'.
>
> Even
>
>   Curl curlVersion
>
> gives a primitive failure.
>
> Any idea what I am doing wrong?
>
> I am using the plugin that comes shipped with the latest Mac VM.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Lukas Renggli
> MMm the curlplugin is oh what 3 year, 6 months old. I guess interest means compiling up a new one.

A new version would be super cool, indeed :-)

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Fernando olivero
Alien could be used, for reifying the Curl library in the system.

I don't have the time to do it, but i could give pointers on how to start.

Fernando

On Feb 1, 2010, at 9:59 AM, Lukas Renggli wrote:

>> MMm the curlplugin is oh what 3 year, 6 months old. I guess interest means compiling up a new one.
>
> A new version would be super cool, indeed :-)
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems - CurlPlugin.1.1.0.bundle.zip

johnmci
In reply to this post by Lukas Renggli
Ok, I build a new CurlPlugin.bundle for os-x   Version 1.1.0

Find that via http://www.smalltalkconsulting.com/squeak.html

http://homepage.mac.com/johnmci/FileSharing.html
or
ftp://ftp.smalltalkconsulting.com

look in the experimental folder for
CurlPlugin.1.1.0.bundle.zip

Now first it's 2:00am in the morning here, and I didn't bother to test it!  So we'll run on blind luck since it *compiles & links* must be ok then?

The 1.0.0 version was compiled in 2006 and statically linked to a version of curl from MacPorts for running on os-x 10.2.8

The 1.1.0 version is compiled for 10.5 (ppc, macintel 32) and is dynamically linked to libcurl supply by your operating system.


No doubt someone in Europe can let me know if the SUnits pass?  If there is a lack of SUnits, then I'd suggest someone add  some more
if we want to make Curl a more important part of the network transport layer in Squeak.



On 2010-02-01, at 12:59 AM, Lukas Renggli wrote:

>> MMm the curlplugin is oh what 3 year, 6 months old. I guess interest means compiling up a new one.
>
> A new version would be super cool, indeed :-)
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Lukas Renggli
In reply to this post by Fernando olivero
> Alien could be used, for reifying the Curl library in the system.
>
> I don't have the time to do it, but i could give pointers on how to start.

Yeah, that's a good idea too. Is there an Alien tutorial somewhere?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems - CurlPlugin.1.1.0.bundle.zip

Lukas Renggli
In reply to this post by johnmci
Wow, that was quick.

This works definitely much better. No more primitive failures for the
examples I gave in my mail.

   Curl curlVersion --> 'libcurl/7.19.4 OpenSSL/0.9.8l zlib/1.2.3'

I'll experiment a bit more tonight and let you know if there are any problems.

> No doubt someone in Europe can let me know if the SUnits pass?  If there is a lack of SUnits, then I'd suggest someone add  some more
> if we want to make Curl a more important part of the network transport layer in Squeak.

The current interface of Curl is barely useable because it is
basically at the level of C. What I am trying to do is to have it
integrated with the Filesystem package of Colin.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Marco Schmidt
In reply to this post by Lukas Renggli
I began working on an Alien-Curl-Wrapper too. The main problem (for me) was    the missing Alien support under WIN32/LINUX. Without Alien support it is easier to use the current CurlPlugin (with the changes to add header fields to the http requests). A long time ago I requested the integration of these changes in the squeak-vm list (see http://n4.nabble.com/CurlPlugin-23-under-Linux-td276117.html#a276117)...

Marco Schmidt

-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Lukas Renggli
Gesendet: Montag, 1. Februar 2010 13:23
An: [hidden email]
Betreff: Re: [Pharo-project] [squeak-dev] Curl plugin problems

> Alien could be used, for reifying the Curl library in the system.
>
> I don't have the time to do it, but i could give pointers on how to start.

Yeah, that's a good idea too. Is there an Alien tutorial somewhere?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Fernando olivero
In reply to this post by Lukas Renggli
Unfortunately there isnt, but you have these pdf's.

I think i should do one, using AlienOpenGLLibrary as an example.


When i started working with Alien, i made a class AlienLibrary, with convenience methods for starting up.
My idea was to provide the concept of an external Library reified in the image.
 
You could start by looking at the class AlienLibrary and overrides of  its subclass AlienOpenGLLibrary.
Create the AlienCurlLibrary, subclass of AlienLibrary and start from there.


For example an AlienLibrary  needs to tell the Alien plugin ( built in the lastest MacOS vm) the location of the library.  Implementing the  method #libraryName  .
Then you would have to provide behavior for AlienCurlLibrary, by hand, for each library method you want to call.
Again, look at AlienOpenGLLibrary for examples ( methods with no arguments, with multiple arguments ,with no result and with a result ).


Please let me know if i can help you with something else,

Fernando





On Feb 1, 2010, at 1:22 PM, Lukas Renggli wrote:

>> Alien could be used, for reifying the Curl library in the system.
>>
>> I don't have the time to do it, but i could give pointers on how to start.
>
> Yeah, that's a good idea too. Is there an Alien tutorial somewhere?
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Alien FFI.2.pdf (216K) Download Attachment
Alien FFI bowels.2.pdf (111K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

johnmci
In reply to this post by Marco Schmidt
> The Mac CurlPlugin in mac vm is generated at the moment from an older
> version. It is missing functions to add http headers (e.g. to
> authenticate against GData ClientLogin) .

So is that part fixed now?

On 2010-02-01, at 4:38 AM, Schmidt, Marco wrote:

> I began working on an Alien-Curl-Wrapper too. The main problem (for me) was    the missing Alien support under WIN32/LINUX. Without Alien support it is easier to use the current CurlPlugin (with the changes to add header fields to the http requests). A long time ago I requested the integration of these changes in the squeak-vm list (see http://n4.nabble.com/CurlPlugin-23-under-Linux-td276117.html#a276117)...
>
> Marco Schmidt

--
===========================================================================
John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Lukas Renggli
The curl plugin works very well and is very fast for the parts that it
is supposed to work on.

The problem is, that it does not provide a complete API to all the
functionality of libcurl. For example, it is impossible to perform
more sophisticated operations on protocols other than HTTP (like FTP).
Worst of all, there is no way to work around this, because the plugin
provides no direct access to the few low-level functions of libcurl
(like curl_easy_setopt). Instead it wraps many (but by large not all)
possible parameter combinations into an army of rigid primitives :-(

I guess I'll to wait for CurlAlien to come alive.

Lukas

On 1 February 2010 19:21, John M McIntosh
<[hidden email]> wrote:

>> The Mac CurlPlugin in mac vm is generated at the moment from an older
>> version. It is missing functions to add http headers (e.g. to
>> authenticate against GData ClientLogin) .
>
> So is that part fixed now?
>
> On 2010-02-01, at 4:38 AM, Schmidt, Marco wrote:
>
>> I began working on an Alien-Curl-Wrapper too. The main problem (for me) was    the missing Alien support under WIN32/LINUX. Without Alien support it is easier to use the current CurlPlugin (with the changes to add header fields to the http requests). A long time ago I requested the integration of these changes in the squeak-vm list (see http://n4.nabble.com/CurlPlugin-23-under-Linux-td276117.html#a276117)...
>>
>> Marco Schmidt
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Igor Stasenko
Just a lil question: why you using curl, when you can do everything in
smalltalk,
using sockets?

On 1 February 2010 21:39, Lukas Renggli <[hidden email]> wrote:

> The curl plugin works very well and is very fast for the parts that it
> is supposed to work on.
>
> The problem is, that it does not provide a complete API to all the
> functionality of libcurl. For example, it is impossible to perform
> more sophisticated operations on protocols other than HTTP (like FTP).
> Worst of all, there is no way to work around this, because the plugin
> provides no direct access to the few low-level functions of libcurl
> (like curl_easy_setopt). Instead it wraps many (but by large not all)
> possible parameter combinations into an army of rigid primitives :-(
>
> I guess I'll to wait for CurlAlien to come alive.
>
> Lukas
>
> On 1 February 2010 19:21, John M McIntosh
> <[hidden email]> wrote:
>>> The Mac CurlPlugin in mac vm is generated at the moment from an older
>>> version. It is missing functions to add http headers (e.g. to
>>> authenticate against GData ClientLogin) .
>>
>> So is that part fixed now?
>>
>> On 2010-02-01, at 4:38 AM, Schmidt, Marco wrote:
>>
>>> I began working on an Alien-Curl-Wrapper too. The main problem (for me) was    the missing Alien support under WIN32/LINUX. Without Alien support it is easier to use the current CurlPlugin (with the changes to add header fields to the http requests). A long time ago I requested the integration of these changes in the squeak-vm list (see http://n4.nabble.com/CurlPlugin-23-under-Linux-td276117.html#a276117)...
>>>
>>> Marco Schmidt
>>
>> --
>> ===========================================================================
>> John M. McIntosh <[hidden email]>   Twitter:  squeaker68882
>> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
>> ===========================================================================
>>
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>>
>
>
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems

Lukas Renggli
> Just a lil question: why you using curl, when you can do everything in
> smalltalk, using sockets?

Sure, that could be done if I had several years of free time and if I
wouldn't be bored reading and implementing dozens of RFC standards.
Properly supporting protocols (this is definitely not what HTTPSocket
and FTPClient do) like FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP,
TELNET, DICT, LDAP, LDAPS and FILE means a lot of work.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Curl plugin problems - CurlPlugin.1.1.0.bundle.zip

heinsaris
In reply to this post by johnmci
Hi,

I tested a 2.0.0 version of the plugin sent to me by John, and it passes all the tests except for the timeout option test in CurlTests>>testApiOptions, which fails.

I also tested the 1.1.0 version of the plugin, but that does not pass most of the tests. I fails on primitive 'primSetOptLong'.

I use Pharo 1.0 (oneclick) on a MBP running Snow Leopard (10.6.3).
The libcurl version reported by Curl>>curlVersion is 'libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3'.

Kind regards,

Hein