Cookies for localhost only using domain= with libsoup

I just implemented a prototype of an XMLRPC server using libsoup. Read more on Savannah.

Now, I face a problem to set cookies for domain=localhost. Since the domain name has to include a dot, I did this as a workaround:

    if(strchr(server->domain, '.') == NULL){
      domain = server->ip4;
      domain = server->domain;

    path = "/";
    /* response */
    login_cookie = soup_cookie_new("ags-srv-login",

But I am not happy with it because there might be no IPv4 address at all, if it uses IPv6 I have the same problem as with local domains.

How would you fix this issue? What about omitting domain and path?

best regards,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.