]> spindle.queued.net Git - midori/commitdiff
Strip HTTP Host to outsmart some filter proxies
authorChristian Dywan <christian@twotoasts.de>
Tue, 28 Aug 2012 17:39:55 +0000 (19:39 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 28 Aug 2012 23:09:25 +0000 (01:09 +0200)
midori/main.c

index e87ab9210243bfc95eb8be2d236eb33a23269796..4e7a596f544211322919c18245271d596ab71704 100644 (file)
@@ -928,6 +928,10 @@ midori_soup_session_settings_accept_language_cb (SoupSession*       session,
             }
             g_free (stripped_referer);
         }
+
+        /* With HTTP, Host is optional. Strip to outsmart some filter proxies */
+        if (destination && destination->scheme == SOUP_URI_SCHEME_HTTP)
+            soup_message_headers_replace (msg->request_headers, "Host", NULL);
     }
 }