cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Why is curl slow in reading a </html>less page?

From: Mohamed LRHAZI <mohamed_at_lrhazi.com>
Date: Sun, 25 Mar 2001 23:38:13 -0500

Daniel,

The web site I am having trouble with is internal to the company I work
for, but
I am going to try reproducing with same page content...

I am using linux mandrake's rpm :
curl-7.6.1-1mdk
curl-lib-7.6.1-1mdk

>curl -V
curl 7.6.1 (i586-mandrake-linux-gnu) libcurl 7.6.1 (SSL 0.9.5)

The site is expecting a POST of username and password, but the problem
is there
even if I do not send the data :
I can reproduce this from command line as follows:

$ date ;curl http://host.domain:7001/customerq.htm;date
Sun Mar 25 23:33:48 EST 2001
<HEAD><TITLE>Invalid User</TITLE></HEAD>
<BODY><H2>Invalid User</H2>
<p>No details are available
</BODY>
Sun Mar 25 23:34:18 EST 2001

$ curl -i -m 3 -N http://host.domain:7001/customerq.htm
HTTP/1.0 403 Invalid User
Host: f111
Date: Monday, 26 Mar 2001 04:31:22 GMT
Server: WebQ/3.3
MIME-version: 1.0
Content-Type: text/html
Content-Length: 105
Connection: Keep-Alive
Keep-Alive: timeout=30
 
<HEAD><TITLE>Invalid User</TITLE></HEAD>
<BODY><H2>Invalid User</H2>
<p>No details are available
</BODY>
curl: (28) Operation timed out with 105 out of 105 bytes received

From PHP, can I use this no buffer option and timeout, and be able to
get the amout of byets read out of what should have been read...
This could be enough for me.

Thanx for any hints.
Mohamed~
      

Daniel Stenberg wrote:
>
> On Sun, 25 Mar 2001, Mohamed LRHAZI wrote:
>
> > Did you ever come across this situation where the web server sends an
> > HTML page without <html> </html>, and curl just takes a long while
> > (25seconds) to finaly return?
>
> No, I have never experienced that.
>
> > Does curl realy wait for </html>?
>
> Nope. curl has no clue about the actual contents that it transfers.
>
> > When I use MSIE or opera or netscape, the page displays immidiatly.
> >
> > Any idea how to avoid this waiting? setting the read_timeout doesnt seem
> > to be the way, since when I try it the read seems to get canceled!
>
> Can you show us a URL that makes this happen? Can you also please tell us
> what curl version and operating system you're using?
>
> --
> Daniel Stenberg -- curl project maintainer -- http://curl.haxx.se/
>
> _______________________________________________
> Curl-and-php mailing list
> Curl-and-php_at_lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/curl-and-php

_______________________________________________
Curl-and-php mailing list
Curl-and-php_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-and-php
Received on 2001-03-26