Problem with Zinc?

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

Problem with Zinc?

Damien Cassou
The following always freezess my Pharo 2.0 image:

ZnClient new
        systemPolicy;
        multiPartFormDataEntity;
        http;
        host: 'http://code.google.com';
        path: '/p/pharo/issues/entry.do';
        queryAt: 'summary' put: 'A summary text', Date today asString;
        queryAt: 'comment' put: 'A short comment';
        post

--
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Zinc?

Sven Van Caekenberghe
Damien,

On 15 May 2012, at 16:42, Damien Cassou wrote:

> ZnClient new
> systemPolicy;
> multiPartFormDataEntity;
> http;
> host: 'http://code.google.com';
> path: '/p/pharo/issues/entry.do';
> queryAt: 'summary' put: 'A summary text', Date today asString;
> queryAt: 'comment' put: 'A short comment';
> post

Please try:

ZnClient new
        logToTranscript;
        http;
        host: 'code.google.com';
        path: '/p/pharo/issues/entry.do';
        formAt: 'summary' put: 'A summary text', Date today asString;
        formAt: 'comment' put: 'A short comment';
        post.

It still gives a bad request. I suppose you are trying to submit a form, maybe you did not add enough form fields, maybe you need a session id or cookie, or authentication.

The hang occured in my 1.4 image as well and is probably related to the 'http://' in the host field and DNS resolving. I can't say for sure, since I couldn't do an interrupt and debug.

HTH,


Sven


--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill