[erlang-questions] ibrowse compile error

Scott Zhang getyourcontacts@REDACTED
Wed Feb 18 09:06:19 CET 2009


Actually I tried on 2 server one in China and one in US. Both of them are
not working.
And more, I have to use wireshark to track the package for this http
session.  I saw when I was using firefox and .NET program to get this url. I
saw the correct GET + many many continueous and at end, it get an Response
Code 200. Then everything is fine.

When I am using http client and ibrowse, I saw the correct GET + many many
continueous
30821 2503.516971 67.55.101.167 192.168.1.101 TCP [TCP segment of a
reassembled PDU]

then
sometimes, I never saw the Response Code 200. Sometimes, I saw the response
Code 200 but the erlang program is still blinking there?

I have another question, is there a possibility erlang's low level TCP
implement has flaw to make it unable to detect tcp shutdown or keepalive? If
not why http client and ibrowse can't run correct?


Regards.
Scott



On Wed, Feb 18, 2009 at 3:58 PM, Scott Zhang <getyourcontacts@REDACTED>wrote:

> Hi. Nicolas.Please check my attachment.
>
> I did exactly what you told. It is still not working. I'm glad if I can get
> a no proc error instead a endless blinking.
>
> Regards.
> Scott
>
> On Wed, Feb 18, 2009 at 3:34 PM, Nicolas Charpentier <
> nc-dated-1240126482.4ea222@REDACTED> wrote:
>
>> Hi,
>>
>> Scott Zhang wrote:
>>
>>> Hi. All. Another big issue with http client within erlang distribution
>>> and ibrowse.  That makes me start to wonder is ibrowse/http client really
>>> working?
>>>
>>> Please try following url.
>>> http://www.cisworldwide.com/xweb/xweb_parser.php?premiumredirect=http%3A%2F%2Fwww.cisworldwide.com%2Fxweb%2Fpremiumsearches%2FxmlNewBackgroundSearch.php%3Fatype%3Dcaps%26fname%3Dscott%26middle_initial%3D%26lname%3Dzhang%26city%3D%26state%3D%26zip%3D%26client_reference%3Dplutux%40harbork.%26cisrestype%3Dunlimited_background&code=11111111&cemail=macromarship@gmail.com...
>>> But whether I use http client or ibrowse, they never returns, just hang
>>> there, even I wait for 10 minutes.
>>>
>> > ...
>>
>>  1. http client
>>> get_url(Url) ->
>>> case http:request(get, {Url, []}, [], []) of
>>> {ok, {{Version, 200, ReasonPhrase}, Headers, Body}}  ->
>>> Body;
>>> _ -> sleep(500),get_url(Url)
>>> end.
>>>
>>
>> It tried inets http client with your url and it works for me.
>> Looking at your code, there is an infinite loop if the response isn't ok
>> (and response code 2000). Did you tried just this ?
>>
>> 1> inets:start().
>> 2> Url = "your long url".
>> 3> http:request(get, {Url, []}, [], []).
>>
>>
>> The inets application must be started before the request otherwise you'll
>> get an noproc error (I thing that it's your case).
>>
>>
>> Regards,
>> -----
>> Nicolas Charpentier
>> http://charpi.net
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090218/1dceef18/attachment.htm>


More information about the erlang-questions mailing list