Host Not Found Misunderstanding

neon at neon at
Mon Feb 4 09:03:57 EST 2013

Hello. I've followed the simple example shown here: .

A snippet of relevant code:

void testNeon()
    char *url = "my_owncloud_instance_url/remote.php/webdav";

    ne_session *dav;
    int res, fd;


    dav = ne_session_create("http", url, 80);

    ne_set_server_auth(dav, define_auth, NULL);

    res = ne_mkcol(dav, "/test/");

    if (res != NE_OK)
        qDebug() << "Request failed:" << QString(ne_get_error(dav));
        qDebug() << "Success!";

static int define_auth(void *userdata, const char *realm, int attempts, char *username, char *password)
    char *user = "username";
    char *pass = "userpassword";

    strncpy(username, user, NE_ABUFSIZ);
    strncpy(password, pass, NE_ABUFSIZ);

    return attempts;

This prints out "Request failed: Could not resolve hostname 'my_owncloud_instance_url/remote.php/webdav': Host not found"

When my visit the URL in question in firefox (actually copying the url posted in the error), it prompts me for my username and password. This implies to me that it's working. Am I missing something? I would appreciate any help!

Kyle Fazzari
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the neon mailing list