]> granicus.if.org Git - curl/commitdiff
urlapi: document the error codes, remove two unused ones
authorDaniel Stenberg <daniel@haxx.se>
Wed, 19 Sep 2018 09:28:40 +0000 (11:28 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 19 Sep 2018 21:25:11 +0000 (23:25 +0200)
Assisted-by: Daniel Gustafsson
Closes #3019

docs/libcurl/libcurl-errors.3
docs/libcurl/symbols-in-versions
include/curl/urlapi.h
tests/libtest/lib1560.c

index 2c866b0d2f7cb4b7a71801d584c276c34e845926..501d2271885b304fd7eb10bd3deba6c616d8b908 100644 (file)
@@ -5,7 +5,7 @@
 .\" *                            | (__| |_| |  _ <| |___
 .\" *                             \___|\___/|_| \_\_____|
 .\" *
-.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
+.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 .\" *
 .\" * This software is licensed as described in the file COPYING, which
 .\" * you should have received as part of this distribution. The terms
@@ -306,6 +306,41 @@ Not enough memory was available.
 .IP "CURLSHE_NOT_BUILT_IN (5)"
 The requested sharing could not be done because the library you use don't have
 that particular feature enabled. (Added in 7.23.0)
+.SH "CURLUcode"
+.IP "CURLUE_BAD_HANDLE (1)"
+An argument that should be a CURLU pointer was passed in as a NULL.
+.IP "CURLUE_BAD_PARTPOINTER (2)"
+A NULL pointer was passed to the 'part' argument of \fIcurl_url_get(3)\fP.
+.IP "CURLUE_MALFORMED_INPUT (3)"
+A malformed input was passed to a URL API function.
+.IP "CURLUE_BAD_PORT_NUMBER (4)"
+The port number was not a decimal number between 0 and 65535.
+.IP "CURLUE_UNSUPPORTED_SCHEME (5)"
+This libcurl build doesn't support the given URL scheme.
+.IP "CURLUE_URLDECODE (6)"
+URL decode error, most likely because of rubbish in the input.
+.IP "CURLUE_OUT_OF_MEMORY (7)"
+A memory function failed.
+.IP "CURLUE_USER_NOT_ALLOWED (8)"
+Credentials was passed in the URL when prohibited.
+.IP "CURLUE_UNKNOWN_PART (9)"
+An unknown part ID was passed to a URL API function.
+.IP "CURLUE_NO_SCHEME (10)"
+There is no scheme part in the URL.
+.IP "CURLUE_NO_USER (11)"
+There is no user part in the URL.
+.IP "CURLUE_NO_PASSWORD (12)"
+There is no password part in the URL.
+.IP "CURLUE_NO_OPTIONS (13)"
+There is no options part in the URL.
+.IP "CURLUE_NO_HOST (14)"
+There is no host part in the URL.
+.IP "CURLUE_NO_PORT (15)"
+There is no port part in the URL.
+.IP "CURLUE_NO_QUERY (16)"
+There is no query part in the URL.
+.IP "CURLUE_NO_FRAGMENT (17)"
+There is no fragment part in the URL.
 .SH "SEE ALSO"
 .BR curl_easy_strerror "(3), " curl_multi_strerror "(3), "
 .BR curl_share_strerror "(3), " CURLOPT_ERRORBUFFER "(3), "
index 950eb5bc67d98c7b51dfcad29d7fb07cb0ec1f0b..a60a7148b5218f922a1a85176f3408635e07c473 100644 (file)
@@ -739,14 +739,12 @@ CURLUE_NO_FRAGMENT              7.62.0
 CURLUE_NO_HOST                  7.62.0
 CURLUE_NO_OPTIONS               7.62.0
 CURLUE_NO_PASSWORD              7.62.0
-CURLUE_NO_PATH                  7.62.0
 CURLUE_NO_PORT                  7.62.0
 CURLUE_NO_QUERY                 7.62.0
 CURLUE_NO_SCHEME                7.62.0
 CURLUE_NO_USER                  7.62.0
 CURLUE_OK                       7.62.0
 CURLUE_OUT_OF_MEMORY            7.62.0
-CURLUE_RELATIVE                 7.62.0
 CURLUE_UNKNOWN_PART             7.62.0
 CURLUE_UNSUPPORTED_SCHEME       7.62.0
 CURLUE_URLDECODE                7.62.0
index 319de35b7accd318f6bcb8e1e8b0a4978687a617..90dd56c00047e9efa107e72cf54df01dc30160db 100644 (file)
@@ -35,7 +35,7 @@ typedef enum {
   CURLUE_BAD_PORT_NUMBER,     /* 4 */
   CURLUE_UNSUPPORTED_SCHEME,  /* 5 */
   CURLUE_URLDECODE,           /* 6 */
-  CURLUE_RELATIVE,            /* 7 */
+  CURLUE_OUT_OF_MEMORY,       /* 7 */
   CURLUE_USER_NOT_ALLOWED,    /* 8 */
   CURLUE_UNKNOWN_PART,        /* 9 */
   CURLUE_NO_SCHEME,           /* 10 */
@@ -44,10 +44,8 @@ typedef enum {
   CURLUE_NO_OPTIONS,          /* 13 */
   CURLUE_NO_HOST,             /* 14 */
   CURLUE_NO_PORT,             /* 15 */
-  CURLUE_NO_PATH,             /* 16 */
-  CURLUE_NO_QUERY,            /* 17 */
-  CURLUE_NO_FRAGMENT,         /* 18 */
-  CURLUE_OUT_OF_MEMORY        /* 19 */
+  CURLUE_NO_QUERY,            /* 16 */
+  CURLUE_NO_FRAGMENT          /* 17 */
 } CURLUcode;
 
 typedef enum {
index 30fb582a29b2d023dcf3442a5273347d396d3da5..224cb880fa36859e892d37364a09df04e215386b 100644 (file)
@@ -129,7 +129,7 @@ struct querycase {
 
 static struct testcase get_parts_list[] ={
   {"https://127.0.0.1:443",
-   "https | [11] | [12] | [13] | 127.0.0.1 | [15] | / | [17] | [18]",
+   "https | [11] | [12] | [13] | 127.0.0.1 | [15] | / | [16] | [17]",
    0, CURLU_NO_DEFAULT_PORT, CURLUE_OK},
   {"http://%3a:%3a@ex%0ample/%3f+?+%3f+%23#+%23%3f%g7",
    "http | : | : | [13] | [6] | [15] | /?+ |  ? # | +#?%g7",
@@ -138,43 +138,43 @@ static struct testcase get_parts_list[] ={
    "http | %3a | %3a | [13] | ex%0ample | [15] | /%3f | %3f%35 | %35%3f%g7",
    0, 0, CURLUE_OK},
   {"http://HO0_-st%41/",
-   "http | [11] | [12] | [13] | HO0_-st%41 | [15] | / | [17] | [18]",
+   "http | [11] | [12] | [13] | HO0_-st%41 | [15] | / | [16] | [17]",
    0, 0, CURLUE_OK},
   {"file://hello.html",
    "",
    0, 0, CURLUE_MALFORMED_INPUT},
   {"http://HO0_-st/",
-   "http | [11] | [12] | [13] | HO0_-st | [15] | / | [17] | [18]",
+   "http | [11] | [12] | [13] | HO0_-st | [15] | / | [16] | [17]",
    0, 0, CURLUE_OK},
   {"imap://user:pass;option@server/path",
-   "imap | user | pass | option | server | [15] | /path | [17] | [18]",
+   "imap | user | pass | option | server | [15] | /path | [16] | [17]",
    0, 0, CURLUE_OK},
   {"http://user:pass;option@server/path",
-   "http | user | pass;option | [13] | server | [15] | /path | [17] | [18]",
+   "http | user | pass;option | [13] | server | [15] | /path | [16] | [17]",
    0, 0, CURLUE_OK},
   {"file:/hello.html",
-   "file | [11] | [12] | [13] | [14] | [15] | /hello.html | [17] | [18]",
+   "file | [11] | [12] | [13] | [14] | [15] | /hello.html | [16] | [17]",
    0, 0, CURLUE_OK},
   {"file://127.0.0.1/hello.html",
-   "file | [11] | [12] | [13] | [14] | [15] | /hello.html | [17] | [18]",
+   "file | [11] | [12] | [13] | [14] | [15] | /hello.html | [16] | [17]",
    0, 0, CURLUE_OK},
   {"file:////hello.html",
-   "file | [11] | [12] | [13] | [14] | [15] | //hello.html | [17] | [18]",
+   "file | [11] | [12] | [13] | [14] | [15] | //hello.html | [16] | [17]",
    0, 0, CURLUE_OK},
   {"file:///hello.html",
-   "file | [11] | [12] | [13] | [14] | [15] | /hello.html | [17] | [18]",
+   "file | [11] | [12] | [13] | [14] | [15] | /hello.html | [16] | [17]",
    0, 0, CURLUE_OK},
   {"https://127.0.0.1",
-   "https | [11] | [12] | [13] | 127.0.0.1 | 443 | / | [17] | [18]",
+   "https | [11] | [12] | [13] | 127.0.0.1 | 443 | / | [16] | [17]",
    0, CURLU_DEFAULT_PORT, CURLUE_OK},
   {"https://127.0.0.1",
-   "https | [11] | [12] | [13] | 127.0.0.1 | [15] | / | [17] | [18]",
+   "https | [11] | [12] | [13] | 127.0.0.1 | [15] | / | [16] | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"https://[::1]:1234",
-   "https | [11] | [12] | [13] | [::1] | 1234 | / | [17] | [18]",
+   "https | [11] | [12] | [13] | [::1] | 1234 | / | [16] | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"https://127abc.com",
-   "https | [11] | [12] | [13] | 127abc.com | [15] | / | [17] | [18]",
+   "https | [11] | [12] | [13] | 127abc.com | [15] | / | [16] | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"https:// example.com?check",
    "",
@@ -183,7 +183,7 @@ static struct testcase get_parts_list[] ={
    "",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_MALFORMED_INPUT},
   {"https://example.com?check",
-   "https | [11] | [12] | [13] | example.com | [15] | / | check | [18]",
+   "https | [11] | [12] | [13] | example.com | [15] | / | check | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"https://example.com:65536",
    "",
@@ -193,27 +193,27 @@ static struct testcase get_parts_list[] ={
    CURLU_DEFAULT_SCHEME, 0, CURLUE_BAD_PORT_NUMBER},
   {"https://example.com:01#moo",
    "https | [11] | [12] | [13] | example.com | 1 | / | "
-   "[17] | moo",
+   "[16] | moo",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"https://example.com:1#moo",
    "https | [11] | [12] | [13] | example.com | 1 | / | "
-   "[17] | moo",
+   "[16] | moo",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"http://example.com#moo",
    "http | [11] | [12] | [13] | example.com | [15] | / | "
-   "[17] | moo",
+   "[16] | moo",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"http://example.com",
    "http | [11] | [12] | [13] | example.com | [15] | / | "
-   "[17] | [18]",
+   "[16] | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"http://example.com/path/html",
    "http | [11] | [12] | [13] | example.com | [15] | /path/html | "
-   "[17] | [18]",
+   "[16] | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"http://example.com/path/html?query=name",
    "http | [11] | [12] | [13] | example.com | [15] | /path/html | "
-   "query=name | [18]",
+   "query=name | [17]",
    CURLU_DEFAULT_SCHEME, 0, CURLUE_OK},
   {"http://example.com/path/html?query=name#anchor",
    "http | [11] | [12] | [13] | example.com | [15] | /path/html | "