Ak 756 wrote the following on 13.08.2007 11:52 :
> Hi
>
> I am using Net::HTTP.post_form to post cgi request to a website and get
> answers.
> Below is my code and I found that it always take about 30s to return the
> result. I think my Internt connection is not so slow as I paste the same
> cgi request url and run in my firefox, it will get result in less then
> 10 second.
>
> puts Time.now
> post_result= Net::HTTP.post_form(URI.parse(url),params)
> puts Time.now
>
> So, how can I make the post_form returns quickly?
>   

Maybe the particular server you are testing reacts differently if you
don't have a session, a referer or the right user-agent ?

> And, I also found many tags like <img src=xxx.gif> in the returned html
> file. Did the post_form download all those gif files?

No, it didn't.