cURL

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1396 cURL ignores named services

From: Daniel Stenberg <bagder_at_users.sf.net>
Date: Wed, 09 Jul 2014 03:36:34 +0000

- **status**: open --> closed-invalid
- **assigned_to**: Daniel Stenberg
- **Comment**:

curl requires you to provide a "URL", the ones we support are defined mostly in RFC3986 and as section 3.2.3 in there says:

"an optional port number in decimal"

Thus, you cannot provide any port in a URL that isn't a decimal number. A service name is not a legitimate port number and thus curl does not support that. It simply is not expected to work!

---
** [bugs:#1396] cURL ignores named services**
**Status:** closed-invalid
**Created:** Tue Jul 08, 2014 05:02 PM UTC by Peter Waller
**Last Updated:** Tue Jul 08, 2014 05:02 PM UTC
**Owner:** Daniel Stenberg
cURL does not respect named services. In fact, it seems to ignore any non-numeric string passed after the : in the hostname, and revert to port 80.
On Ubuntu 12.04 and 14.04, if I curl for example:
$ curl localhost:discard/
I would expect for it to attempt to connect to port 9 (according to man `5 services` and the contents of /etc/services). Instead, it exits with the error:
curl: (7) Failed to connect to localhost port 80: Connection refused
Should I expect this to work?
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-07-09

These mail archives are generated by hypermail.

donate! Page updated March 21, 2014.
web site info

File upload with ASP.NET