hostname or destname
winxxp opened this issue · comments
Bill LeiHao commented
hostname or destname?????
qhttpclient_t *qhttpclient(const char *destname, int port) {
bool ishttps = false;
char hostname[256];
if (port == 0 || strstr(hostname, "://") != NULL) { // hostname or destname?????
if (_parse_uri(destname, &ishttps, hostname, sizeof(hostname), &port)
== false) {
DEBUG("Can't parse URI %s", destname);
return NULL;
}
DEBUG("https: %d, hostname: %s, port:%d\n", ishttps, hostname, port);
} else {
qstrcpy(hostname, sizeof(hostname), destname);
}
Seungyoung Kim (Steve) commented
Thanks for the report. That appeared to be a bug. I've made a PR to address the issue. Thanks