From fbf431efde6063a1a04bd4463df9a2d24f17b4bb Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 6 Mar 2009 11:49:10 +0000 Subject: [PATCH] Set GET as the default when method is not defined (fixes a crash) --- src/ghtml-gtkhtml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ghtml-gtkhtml.c b/src/ghtml-gtkhtml.c index 40aeb71..60ad934 100644 --- a/src/ghtml-gtkhtml.c +++ b/src/ghtml-gtkhtml.c @@ -885,7 +885,7 @@ static void _on_submit(HtmlDocument * document, const gchar * url, ghtml = g_object_get_data(G_OBJECT(document), "ghtml"); if((u = _ghtml_make_url(ghtml->html_base, url)) == NULL) return; /* FIXME report error */ - if(strcasecmp(method, "GET") == 0) + if(method == NULL || strcasecmp(method, "GET") == 0) { v = (encoding != NULL) ? g_strdup_printf("%s?%s", u, encoding) : g_strdup(u);