Accept XML text declaration for Jabber initiating data
[cascardo/rnetproxy.git] / proto_detect.c
index 57bd01a..112ff93 100644 (file)
@@ -42,7 +42,8 @@ static void proto_read (net_hook_t* hook, gchar* buffer, size_t len)
   g_string_append_len (str, buffer, len);
   if (str->len >= 7)
     {
-      if (!strncmp (str->str, "<stream", 7))
+      if (!strncmp (str->str, "<stream", 7) ||
+         !strncmp (str->str, "<?xml ", 6))
        {
          /* Connection is a Jabber client */
          g_debug ("Connection from %s is a Jabber client.",