I do not use the interface from net collection, Module &quot;ssl-url&quot; was provided by Jens,<br><br>(call/input-url (opt-&gt;* (url?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (opt-&gt; (url?) ((listof string?)) input-port?)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (input-port? . -&gt; . any))
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((listof string?))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; any))<br><br><br>BTW, I have tried several times to upgrade to current SVN, but the redex code (3.28) I wrote on version 371 could not run anymore on 
3.99 or later. So I prefer staying on 371.2<br><br><br><br><div class="gmail_quote">On Dec 17, 2007 10:34 PM, Robby Findler &lt;<a href="mailto:robby@cs.uchicago.edu">robby@cs.uchicago.edu</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Oh, one other point. It was pointed out earlier that the function does<br>not actually need that strict of a contract and I believe the contract<br>has been relaxed in SVN.<br><font color="#888888"><br>Robby<br></font><div>
<div></div><div class="Wj3C7c"><br>On Dec 17, 2007 8:22 AM, &nbsp;&lt;<a href="mailto:yug@ios.ac.cn">yug@ios.ac.cn</a>&gt; wrote:<br>&gt; Thanks!! Robby<br>&gt;<br>&gt; The right def is<br>&gt;<br>&gt;<br>&gt; (call/input-url (string-&gt;url &quot;
<a href="https://210.77.16.29/php/user_login.php" target="_blank">https://210.77.16.29/php/user_login.php</a>&quot;)<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (case-lambda<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;[(url) (post-impure-port url data rhead)]
<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [(url rhead) (post-impure-port url data rhead)])<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display-pure-port<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>&gt;<br>&gt;<br>&gt;<br>&gt; &nbsp;On Dec 17, 2007 10:15 PM, Robby Findler &lt;
<a href="mailto:robby@cs.uchicago.edu">robby@cs.uchicago.edu</a>&gt; wrote:<br>&gt; &gt; The contract is insisting that you provide a function that accepts<br>&gt; &gt; *both* one argument and two arguments.<br>&gt; &gt;<br>
&gt; &gt; Robby<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; On Dec 17, 2007 8:13 AM, &nbsp;&lt; <a href="mailto:yug@ios.ac.cn">yug@ios.ac.cn</a>&gt; wrote:<br>&gt; &gt; &gt; Hi,<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp; I&#39;m fresh to contracts. Here is my problem:
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I just want to pass the contracts check on the following definition:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &nbsp;(define test (lambda (url)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(post-impure-port url data rhead)))
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; (provide/contract (test (-&gt; url? input-port?)))<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; (call/input-url (string-&gt;url &quot; <a href="https://210.77.16.29/php/user_login.php" target="_blank">
https://210.77.16.29/php/user_login.php</a>&quot;)<br>&gt; test<br>&gt; &gt; &gt; display-pure-port)<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; or even more simplified:<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; (call/input-url (string-&gt;url &quot; 
<a href="https://210.77.16.29/php/user_login.php" target="_blank">https://210.77.16.29/php/user_login.php</a>&quot;)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(lambda (url)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(post-impure-port url data rhead)))
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display-pure-port)<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Every time, I get:<br>&gt; &gt; &gt; &nbsp; (case-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; (-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;url?<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(case-&gt;
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? input-port?)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? (listof string?) input-port?))<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(-&gt; input-port? any)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;any)<br>&gt; &gt; &gt; &nbsp; &nbsp; (-&gt;
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;url?<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(case-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? input-port?)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? (listof string?) input-port?))<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(-&gt; input-port? any)
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(listof string?)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;any))<br>&gt; &gt; &gt; on call/input-url; expected a procedure that accepts 2 arguments, given:<br>&gt; &gt; &gt; #&lt;procedure:test&gt;<br>&gt; &gt; &gt;<br>
&gt; &gt; &gt; If I change the definition to<br>&gt; &gt; &gt; (call/input-url (string-&gt;url &quot; <a href="https://210.77.16.29/php/user_login.php" target="_blank">https://210.77.16.29/php/user_login.php</a>&quot;)<br>
&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (lambda (url rhead)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (post-impure-port url data rhead)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; display-pure-port<br>
&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<br>&gt; &gt; &gt; . . ssl-url.scm:40:4: /home/yug/ssl-url.scm:40:4: top-level broke the<br>&gt; &gt; &gt; contract<br>&gt; &gt; &gt; &nbsp; (case-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; (-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;url?
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(case-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? input-port?)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? (listof string?) input-port?))<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(-&gt; input-port? any)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;any)
<br>&gt; &gt; &gt; &nbsp; &nbsp; (-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;url?<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(case-&gt;<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? input-port?)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; &nbsp;(-&gt; url? (listof string?) input-port?))<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(-&gt; input-port? any)
<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;(listof string?)<br>&gt; &gt; &gt; &nbsp; &nbsp; &nbsp;any))<br>&gt; &gt; &gt; on call/input-url; expected a procedure that accepts 1 arguments, given:<br>&gt; &gt; &gt; #&lt;procedure&gt;<br>&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>&gt; &gt; &gt; How can I define my function?<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Thanks<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; --<br>&gt; &gt; &gt; Gang<br>&gt; &gt; &gt; _________________________________________________
<br>&gt; &gt; &gt; &nbsp; For list-related administrative tasks:<br>&gt; &gt; &gt; &nbsp; <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>&gt; &gt; &gt;
<br>&gt; &gt; &gt;<br>&gt; &gt; _________________________________________________<br>&gt; &gt; &nbsp;For list-related administrative tasks:<br>&gt; &gt; &nbsp;<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">
http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br>&gt; &gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Gang<br>_________________________________________________<br> &nbsp;For list-related administrative tasks:<br> &nbsp;<a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme" target="_blank">
http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>Gang