MINOR: http: change url_decode to return the size of the decoded string.

Currently url_decode returns 1 or 0 depending on whether it could decode
the string or not. For some future use cases, it will be needed to get the
decoded string length after a successful decoding, so let's make it return
that value, and fall back to a negative one in case of error.
diff --git a/src/standard.c b/src/standard.c
index cd60a94..b519f57 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -1047,13 +1047,13 @@
 
 /* Decode an URL-encoded string in-place. The resulting string might
  * be shorter. If some forbidden characters are found, the conversion is
- * aborted, the string is truncated before the issue and non-zero is returned,
- * otherwise the operation returns non-zero indicating success.
+ * aborted, the string is truncated before the issue and a negative value is
+ * returned, otherwise the operation returns the length of the decoded string.
  */
 int url_decode(char *string)
 {
 	char *in, *out;
-	int ret = 0;
+	int ret = -1;
 
 	in = string;
 	out = string;
@@ -1074,7 +1074,7 @@
 		}
 		in++;
 	}
-	ret = 1; /* success */
+	ret = out - string; /* success */
  end:
 	*out = 0;
 	return ret;