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] Re: #1191 When using a wrong hostname in --interface, the wrong host name appears in the error message

From: Kim Vandry <vandry_at_users.sf.net>
Date: Mon, 18 Feb 2013 20:32:34 +0000

I'm not a cURL developer but I created this bug report so I am going to take a look at it :-)

This is a different issue than the one I brought up.

Actually, Anatol, your issue is not MS Windows only. Rather, it is specific to the threaded resolver.

The problem was revealed in commit c43127414d89ccb9ef6517081f68986d991bcfb3, due to changes in the way the multi interface is used (I think) but it is not the fault of that change. The fault was already present in lib/asyn-thread.c : it attempts to use the hostname in the error message after it has already been freed.

The attached patch will get rid of your problem.

Attachment: asyn-thread.patch (542 Bytes; text/x-patch)

---
** [bugs:#1191] When using a wrong hostname in --interface, the wrong host name appears in the error message**
**Status:** open-confirmed
**Created:** Sun Feb 10, 2013 11:30 PM UTC by Kim Vandry
**Last Updated:** Mon Feb 18, 2013 06:37 PM UTC
**Owner:** Daniel Stenberg
While testing my patch for #1189 I discovered a related problem which is pre-existing: I can reproduce it on the current git master. For test 1084, even though the exit code is correct (45, CURLE_INTERFACE_FAILED) the error text is wrong and confusing:
src/curl --interface DoesNotExist.example.com http://www.google.com/
curl: (45) Could not resolve host: www.google.com (Domain name not found)
Actually it failed to resolve DoesNotExist.example.com, not www.google.com like the error message says. If you use --proxy then the error message says "Could not resolve proxy" which is also not true.
I am not sure what the best way to fix this would be (I can think of a hack or two), but I just wanted to document it single I noticed it.
---
Sent from sourceforge.net because you indicated interest in <https://sourceforge.net/p/curl/bugs/1191/>
To unsubscribe from further messages, please visit <https://sourceforge.net/auth/prefs/>
Received on 2013-02-18

These mail archives are generated by hypermail.

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

File upload with ASP.NET