cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] crash and a fix in Curl_http

From: Shmulik Regev <shmulbox_at_gmail.com>
Date: Mon, 16 Jul 2007 15:50:36 +0300

> Okay, so I added a custom Host: header now to both handles and... the test
> case still runs fine for me!?
>
> My changes are committed.

Strange. I've updated the cvs archive and re-run the test (on my win xp
machine). And the crash is still there. Below please find the output prior
to the crash (modified only to remove data that is private to the
environment I'm running it - company name and server name). Can it be that
on your environment the connection is not reused?

Cheers,
Shmul

* About to connect() to proxy patti port 3129 (#0)
* Trying 192.168.1.31... * Connected to patti (192.168.1.31) port 3129
(#0)

> GET http://curl.haxx.se HTTP/1.1
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
Host: curl.haxx.se

* HTTP 1.0, assume close after body
< HTTP/1.0 407 Proxy Authentication Required
HTTP/1.0 407 Proxy Authentication Required
< Server: squid/2.5.STABLE6
Server: squid/2.5.STABLE6
< Mime-Version: 1.0
Mime-Version: 1.0
< Date: Thu, 12 Jul 2007 21:05:25 GMT
Date: Thu, 12 Jul 2007 21:05:25 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 1308
Content-Length: 1308
< Expires: Thu, 12 Jul 2007 21:05:25 GMT
Expires: Thu, 12 Jul 2007 21:05:25 GMT
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from patti.company.local
X-Cache: MISS from patti.company.local
* HTTP/1.0 proxy connection set to keep alive!
< Proxy-Connection: keep-alive
Proxy-Connection: keep-alive

<
* Ignoring the response-body
* Connection #0 to host patti left intact
* Issue another request to this URL: 'http://curl.haxx.se'
* Re-using existing connection! (#0) with host patti
* Connected to patti (192.168.1.31) port 3129 (#0)
* Proxy auth using Basic with user 'company'
> GET http://curl.haxx.se HTTP/1.1
Proxy-Authorization: Basic cGF0dGk6c21pdGg=
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
Host: curl.haxx.se

* HTTP 1.0, assume close after body
< HTTP/1.0 407 Proxy Authentication Required
HTTP/1.0 407 Proxy Authentication Required
< Server: squid/2.5.STABLE6
Server: squid/2.5.STABLE6
< Mime-Version: 1.0
Mime-Version: 1.0
< Date: Thu, 12 Jul 2007 21:05:25 GMT
Date: Thu, 12 Jul 2007 21:05:25 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 1308
Content-Length: 1308
< Expires: Thu, 12 Jul 2007 21:05:25 GMT
Expires: Thu, 12 Jul 2007 21:05:25 GMT
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
* Authentication problem. Ignoring this.
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from patti.company.local
X-Cache: MISS from patti.company.local
* HTTP/1.0 proxy connection set to keep alive!
< Proxy-Connection: keep-alive
Proxy-Connection: keep-alive

<
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.or
g/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=iso-8859
-1">
<TITLE>ERROR: Cache Access Denied</TITLE>
<STYLE
type="text/css"><!--BODY{background-color:#ffffff;font-family:verdana,san
s-serif}PRE{font-family:sans-serif}--></STYLE>
</HEAD>
<BODY>
<H1>ERROR</H1>
<H2>Cache Access Denied</H2>
<HR noshade size="1px">
<P>
While trying to retrieve the URL:
<A HREF="http://curl.haxx.se">http://curl.haxx.se</A>
<P>
The following error was encountered:
<UL>
<LI>
<STRONG>
Cache Access Denied.
</STRONG>
</UL>
</P>

<P>Sorry, you are not currently allowed to request:
<PRE> http://curl.haxx.se</PRE>
from this cache until you have authenticated yourself.
</P>

<P>
You need to use Netscape version 2.0 or greater, or Microsoft Internet
Explorer 3.0, or an HTTP/1.1 compliant browser for this to work. Please
contact the <A HREF="mailto:root">cache administrator</a> if you have
difficulties authenticating yourself or
<A HREF="http://patti.company.local/cgi-bin/chpasswd.cgi">change</a> your de
fault password.
</P>

<BR clear="all">
<HR noshade size="1px">
<ADDRESS>
Generated Thu, 12 Jul 2007 21:05:25 GMT by patti.company.local (squid/2.5.ST
ABLE6)
</ADDRESS>
</BODY></HTML>
* Connection #0 to host patti left intact
R: 0 - no error <(null)>
lib540: now we do the request again
* Re-using existing connection! (#0) with host patti
* Connected to patti (192.168.1.31) port 3129 (#0)
> GET http://curl.haxx.se HTTP/1.1
Proxy-Authorization: Basic Y29tcGFueTpzbWl0aA==
Pragma: no-cache
Accept: */*
Proxy-Connection: Keep-Alive
Host: curl.haxx.se

* HTTP 1.0, assume close after body
< HTTP/1.0 407 Proxy Authentication Required
HTTP/1.0 407 Proxy Authentication Required
< Server: squid/2.5.STABLE6
Server: squid/2.5.STABLE6
< Mime-Version: 1.0
Mime-Version: 1.0
< Date: Thu, 12 Jul 2007 21:05:25 GMT
Date: Thu, 12 Jul 2007 21:05:25 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 1308
Content-Length: 1308
< Expires: Thu, 12 Jul 2007 21:05:25 GMT
Expires: Thu, 12 Jul 2007 21:05:25 GMT
< X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0
< Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
Proxy-Authenticate: Basic realm="Squid proxy-caching web server"
< X-Cache: MISS from patti.company.local
X-Cache: MISS from patti.company.local
* HTTP/1.0 proxy connection set to keep alive!
< Proxy-Connection: keep-alive
Proxy-Connection: keep-alive

<
* Ignoring the response-body
* Connection #0 to host patti left intact
* Issue another request to this URL: 'http://curl.haxx.se'
* Re-using existing connection! (#0) with host patti
* Connected to patti (192.168.1.31) port 3129 (#0)
* Proxy auth using Basic with user 'company'
Received on 2007-07-16