From 5c46741be86344b9ab52980a14df54baa00ac763 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 4 May 2020 22:24:57 -0400 Subject: [PATCH] LibHTTP: Actually include query parameters when serializing raw request --- Libraries/LibHTTP/HttpRequest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/LibHTTP/HttpRequest.cpp b/Libraries/LibHTTP/HttpRequest.cpp index 1f02e6106d..f3ba313cae 100644 --- a/Libraries/LibHTTP/HttpRequest.cpp +++ b/Libraries/LibHTTP/HttpRequest.cpp @@ -65,6 +65,10 @@ ByteBuffer HttpRequest::to_raw_request() const builder.append(method_name()); builder.append(' '); builder.append(m_url.path()); + if (!m_url.query().is_empty()) { + builder.append('?'); + builder.append(m_url.query()); + } builder.append(" HTTP/1.1\r\nHost: "); builder.append(m_url.host()); builder.append("\r\nConnection: close\r\n\r\n");