2001-08-23 Alex Graveley <alex@ximian.com>
+ * src/soup-core/soup-auth.c (ntlm_new): Fix under-allocation.
+ (ntlm_parse): Comment out the NTLM host/domain parsing code, as it
+ segfaults for some reason. Not that this matters as IIS seems to
+ competely ignore these parts of the NTLM message :) There is also
+ some memory corruption in soup-ntlm.c causing segfaults after the
+ message-finished callback returns.
+
+2001-08-23 Alex Graveley <alex@ximian.com>
+
* src/soup-core/soup-auth.c (soup_auth_invalidates_prior): Add
SoupAuth.compare_func and call this from here, to remove hardcoded
auth scheme knowledge.
{
SoupAuthNTLM *auth = (SoupAuthNTLM *) sa;
const SoupUri *uri = soup_context_get_uri (auth->auth.context);
- gchar *idx, *host, *domain = NULL;
+ gchar *idx, *host = NULL, *domain = NULL;
+ /*
idx = strchr (uri->host, '.');
if (idx)
host = g_strndup (uri->host, idx - uri->host);
}
}
- if (strlen (header) > sizeof ("NTLM"))
+ soup_debug_print_uri (uri);
+ */
+
+ host = "FAKEHOST";
+ domain = "FAKEDOMAIN";
+
+ if (strlen (header) < sizeof ("NTLM"))
auth->request = soup_ntlm_request (host,
domain ? domain : "UNKNOWN");
else {
domain ? domain : "UNKNOWN");
}
+ /*
g_free (host);
g_free (domain);
+ */
}
static void
static SoupAuth *
ntlm_new (void)
{
- SoupAuth *auth;
+ SoupAuthNTLM *auth;
- auth = g_new0 (SoupAuth, 1);
- auth->type = SOUP_AUTH_NTLM;
- auth->compare_func = ntlm_compare_func;
- auth->parse_func = ntlm_parse;
- auth->auth_func = ntlm_auth;
- auth->free_func = ntlm_free;
+ auth = g_new0 (SoupAuthNTLM, 1);
+ auth->auth.type = SOUP_AUTH_NTLM;
+ auth->auth.compare_func = ntlm_compare_func;
+ auth->auth.parse_func = ntlm_parse;
+ auth->auth.auth_func = ntlm_auth;
+ auth->auth.free_func = ntlm_free;
- return auth;
+ return (SoupAuth *) auth;
}
/*