<div dir="ltr">Steve hello,<br><br>Although I've written the curl plugin I'm no expert in http protocol (redirects, posts etc).. <br>My shot: you may try to ask curl to follow redirects as in the example below (not onFollowLocation switch):<br>
<br>c := Curl new.<br>c onFollowLocation.<br>c url: '<a href="http://www.archive.org/advancedsearch.php/searchresults.php">http://www.archive.org/advancedsearch.php/searchresults.php</a>'.<br>c clearContents; contents: 'q=title:dodgers&fmt=xml&rows=50&fl=identifier&indent=&xmlsearch=Search'.<br>
c post.<br>c contents.<br><br><br>I'm getting something like this. If it is not what you need, could you please explain correct behaviour so I may able to fix it?<br><br>q=title:dodgers&fmt=xml&rows=50&fl=identifier&indent=&xmlsearch=Search<?xml version="1.0" encoding="UTF-8"?><br>
<response><br><lst name="responseHeader"><int name="status">0</int><int name="QTime">99</int><lst name="params"><str name="wt">xml</str><str name="rows">50</str><str name="indent"/><str name="qin">title:dodgers</str><str name="q">title:dodgers</str><str name="fl"/></lst></lst><result name="response" numFound="8" start="0" maxScore="6.4772797"><doc><float name="score">6.4772797</float><float name="avg_rating">0.0</float>...........<br>
<br>Regards,<br> Danil<br><br><div class="gmail_quote">2008/8/16 Steven W Riggins <span dir="ltr"><<a href="mailto:mailinglists@geeksrus.com">mailinglists@geeksrus.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is anyone using the curl plugin from:<br>
<br>
<a href="http://wiki.squeak.org/squeak/5865" target="_blank">http://wiki.squeak.org/squeak/5865</a><br>
<br>
I am trying to do a post to a site that redirects, but I see two anomalies:<br>
<br>
<br>
1) the contents remain in the contents buffer, so that tells me I am doing posts incorrectly<br>
2) I just get the http page back, not the results of the post<br>
<br>
I tried this with another form and it posted ok, but I did get the post in the contents buffer as well.<br>
<br>
The following command to curl works as desired:<br>
<br>
curl -d "q=title:help&fmt=xml&rows=50&fl=identifier&xmlsearch=Search" <a href="http://www.archive.org/advancedsearch.php/searchresults.php" target="_blank">http://www.archive.org/advancedsearch.php/searchresults.php</a><br>
<br>
but:<br>
<br>
c := Curl new.<br>
c url: '<a href="http://www.archive.org/advancedsearch.php/searchresults.php" target="_blank">http://www.archive.org/advancedsearch.php/searchresults.php</a>'<br>
c clearContents; contents: 'q=title:dodgers&fmt=xml&rows=50&fl=identifier&indent=&xmlsearch=Search'<br>
c post<br>
<br>
returns:<br>
<br>
'q=title%3Adodgers&fmt=xml&rows=50&fl=identifier&indent=&xmlsearch=Search'<br>
<br>
ie, the post failed.<br>
<br>
Steve<br>
<br>
</blockquote></div><br></div>