]> git.proxmox.com Git - libgit2.git/commitdiff
Clarify parsing issues and errors
authorBen Straub <bs@github.com>
Sat, 2 Nov 2013 02:22:43 +0000 (19:22 -0700)
committerBen Straub <bs@github.com>
Sat, 2 Nov 2013 02:22:43 +0000 (19:22 -0700)
src/netops.c

index 0bf3a8f139bda12ac65c7d8c38a3ae76e199e513..d2acdb240c3ad018496834f8bdad8e731c366751 100644 (file)
@@ -674,7 +674,8 @@ int gitno_extract_url_parts(
         * ==> [user[:pass]@]hostname.tld[:port]/resource
         */
 
-       /* Check for user and maybe password */
+       /* Check for user and maybe password. Note that this deviates from RFC-1738
+        * in that it allows non-encoded colons in the password field. */
        at = strchr(url, '@');
        if (at) {
                colon = strchr(url, ':');
@@ -695,7 +696,7 @@ int gitno_extract_url_parts(
        colon = strchr(url, ':');
        if (!slash ||
            (colon && (slash < colon))) {
-               giterr_set(GITERR_NET, "Malformed URL");
+               giterr_set(GITERR_NET, "Malformed URL: %s", url);
                return GIT_EINVALIDSPEC;
        }