Allow extensions when no protocol was specified. 47/2847/1
authorDavid Galeano <davidgaleano@turbulenz.biz>
Wed, 9 Jan 2013 11:49:50 +0000 (19:49 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:22 +0000 (13:01 -0800)
lib/libwebsockets.c

index ee20327..6fa27aa 100644 (file)
@@ -1213,7 +1213,7 @@ select_protocol:
                wsi->c_callback = wsi->protocol->callback;
                free(wsi->c_protocol);
 
-               goto check_accept;
+               goto check_extensions;
        }
 
        while (*pc && !okay) {
@@ -1265,6 +1265,8 @@ select_protocol:
        }
 
 
+check_extensions:
+
        /* instantiate the accepted extensions */
 
        if (!wsi->utf8_token[WSI_TOKEN_EXTENSIONS].token_len) {