cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3564650 ] Option "-f" changes IPv6 connect behaviour

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 04 Sep 2012 02:09:09 -0700

Bugs item #3564650, was opened at 2012-09-04 02:09
Message generated for change (Tracker Item Submitted) made by pfhllnts
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3564650&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: client module
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Pieter Hollants (pfhllnts)
Assigned to: Daniel Stenberg (bagder)
Summary: Option "-f" changes IPv6 connect behaviour

Initial Comment:
Using the curl command line utility to fetch an invalid URL returns an error document, as expected:

holpi011@holpi011-dev:~/curl/src> LANG=C curl -v "http://www.google.com/bla"
* About to connect() to www.google.com port 80 (#0)
* Trying 2a00:1450:4016:800::1010... Failed to connect to 2a00:1450:4016:800::1010: Network is unreachable
* Success
* Trying 173.194.35.180... connected
> GET /bla HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-unknown-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.0e zlib/1.2.5 c-ares/1.7.5 libidn/1.22 libssh2/1.2.9
> Host: www.google.com
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Content-Type: text/html; charset=UTF-8
< X-Content-Type-Options: nosniff
< Date: Tue, 04 Sep 2012 09:05:32 GMT
< Server: sffe
< Content-Length: 934
< X-XSS-Protection: 1; mode=block
<
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 404 (Not Found)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
  </style>
  <a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>
  <p><b>404.</b> <ins>That’s an error.</ins>
  <p>The requested URL <code>/bla</code> was not found on this server. <ins>That’s all we know.</ins>
* Connection #0 to host www.google.com left intact
* Closing connection #0

However, when using the "-f" command line switch, one gets the wrong error message:

holpi011@holpi011-dev:~/curl/src> LANG=C curl -f -v "http://www.google.com/bla"
* About to connect() to www.google.com port 80 (#0)
* Trying 2a00:1450:4016:800::1010... Failed to connect to 2a00:1450:4016:800::1010: Network is unreachable
* Success
* Trying 173.194.35.147... connected
> GET /bla HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-unknown-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.0e zlib/1.2.5 c-ares/1.7.5 libidn/1.22 libssh2/1.2.9
> Host: www.google.com
> Accept: */*
>
* The requested URL returned error: 404
* Closing connection #0
curl: (22) Failed to connect to 2a00:1450:4016:800::1010: Network is unreachable

Using "-f" correctly surpresses the error document but returns the wrong error message: the real error is the 404, not the failed IPv6 connect.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3564650&group_id=976
Received on 2012-09-04

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET