url->LocalPart = strchr(pch, '/');
if (url->LocalPart != NULL) {
if ((*(url->LocalPart + 1) == '/') &&
url->LocalPart = strchr(pch, '/');
if (url->LocalPart != NULL) {
if ((*(url->LocalPart + 1) == '/') &&
- (*(url->LocalPart + 2) == ':')) { /* TODO: find default port for this protocol... */
- url->Host = url->LocalPart + 3;
+ (*(url->LocalPart - 1) == ':')) { /* TODO: find default port for this protocol... */
+ url->Host = url->LocalPart + 2;
else
Url->UrlWithoutCred = NewStrBufPlain(HKEY("http://"));
StrBufAppendBufPlain(Url->UrlWithoutCred, Url->Host, -1, 0);
else
Url->UrlWithoutCred = NewStrBufPlain(HKEY("http://"));
StrBufAppendBufPlain(Url->UrlWithoutCred, Url->Host, -1, 0);
StrBufAppendBufPlain(Url->UrlWithoutCred, HKEY(":"), 0);
StrBufAppendPrintf(Url->UrlWithoutCred, "%u", Url->Port);
StrBufAppendBufPlain(Url->UrlWithoutCred, HKEY(":"), 0);
StrBufAppendPrintf(Url->UrlWithoutCred, "%u", Url->Port);
- StrBufAppendBufPlain(Url->UrlWithoutCred, Url->LocalPart, -1, 0);
+ {
+ StrBufAppendBufPlain(Url->UrlWithoutCred, Url->LocalPart, -1, 0);
+ }
if (Url->Pass != NULL)
StrBufAppendBufPlain(Url->CurlCreds, Url->Pass, -1, 0);
}
if (Url->Pass != NULL)
StrBufAppendBufPlain(Url->CurlCreds, Url->Pass, -1, 0);
}