Download raw body.
fix got clone url with trailing slash
Stefan Sperling:
> This patch makes the URI parser tolerate trailing slashes at the end
> of the input URI and adds a few additional sanity checks for empty
> URI components found during parsing.
ok naddy
I noticed that we also need to fix the level of indirection in two
places:
diff 456f032ded164edd13735eb90268950619f02c22 7cc7e79e6b416c1510fb88f83a659c2b46147a6e
blob - 2e29508e51eb4534e7588561c727f6b6cf352503
blob + 096f0320a2c1debb9a1de9ac9c0a8e2bbab704cd
--- lib/dial.c
+++ lib/dial.c
@@ -90,7 +90,7 @@ got_dial_parse_uri(char **proto, char **host, char **p
if (!p) {
/* Try parsing Git's "scp" style URL syntax. */
*proto = strdup("ssh");
- if (proto == NULL) {
+ if (*proto == NULL) {
err = got_error_from_errno("strdup");
goto done;
}
@@ -118,7 +118,7 @@ got_dial_parse_uri(char **proto, char **host, char **p
p = q + 1;
} else {
*proto = strndup(uri, p - uri);
- if (proto == NULL) {
+ if (*proto == NULL) {
err = got_error_from_errno("strndup");
goto done;
}
--
Christian "naddy" Weisgerber naddy@mips.inka.de
fix got clone url with trailing slash