[libsoup] io-http2: do not try make header name/value valid UTF-8



commit 9c6d483764862aacfaaf69a65b752650b56f1cac
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Thu May 27 13:48:25 2021 +0200

    io-http2: do not try make header name/value valid UTF-8
    
    nghttp2 already ensures they don't have any invalid character.

 libsoup/http2/soup-client-message-io-http2.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/libsoup/http2/soup-client-message-io-http2.c b/libsoup/http2/soup-client-message-io-http2.c
index df78eb46..15794c89 100644
--- a/libsoup/http2/soup-client-message-io-http2.c
+++ b/libsoup/http2/soup-client-message-io-http2.c
@@ -317,13 +317,8 @@ on_header_callback (nghttp2_session     *session,
                 return 0;
         }
 
-        // FIXME: Encoding
-        char *name_utf8 = g_utf8_make_valid ((const char *)name, namelen);
-        char *value_utf8 = g_utf8_make_valid ((const char *)value, valuelen);
         soup_message_headers_append (soup_message_get_response_headers (data->msg),
-                                     name_utf8, value_utf8);
-        g_free (name_utf8);
-        g_free (value_utf8);
+                                     (const char *)name, (const char *)value);
         return 0;
 }
 


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