[libsoup] websockets: Use more helpful error when payload too large



commit 3da35ab389a837e6f8d36eac6bc7982e4f9890a5
Author: Patrick Griffis <pgriffis igalia com>
Date:   Mon Nov 8 19:21:51 2021 -0600

    websockets: Use more helpful error when payload too large
    
    Show a hint on where to change this size for developers.
    
    Closes #247

 libsoup/websocket/soup-websocket-connection.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libsoup/websocket/soup-websocket-connection.c b/libsoup/websocket/soup-websocket-connection.c
index 0f5557e4..a46bcaaa 100644
--- a/libsoup/websocket/soup-websocket-connection.c
+++ b/libsoup/websocket/soup-websocket-connection.c
@@ -679,8 +679,8 @@ too_big_error_and_close (SoupWebsocketConnection *self,
        error = g_error_new_literal (SOUP_WEBSOCKET_ERROR,
                                     SOUP_WEBSOCKET_CLOSE_TOO_BIG,
                                     priv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER ?
-                                    "Received extremely large WebSocket data from the client" :
-                                    "Received extremely large WebSocket data from the server");
+                                    "Received WebSocket payload from the client larger than configured 
max-incoming-payload-size" :
+                                    "Received WebSocket payload from the server larger than configured 
max-incoming-payload-size");
        g_debug ("%s is trying to frame of size %" G_GUINT64_FORMAT " or greater, but max supported size is 
%" G_GUINT64_FORMAT,
                 priv->connection_type == SOUP_WEBSOCKET_CONNECTION_SERVER ? "server" : "client",
                 payload_len, priv->max_incoming_payload_size);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]