qlibc icon indicating copy to clipboard operation
qlibc copied to clipboard

hostname or destname

Open winxxp opened this issue 4 years ago • 0 comments

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);
    }

winxxp avatar Aug 14 '21 06:08 winxxp