mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibHTTP: Append port to Host header if it exists
This commit is contained in:
parent
0fd51ae811
commit
8fee285d72
Notes:
sideshowbarker
2024-07-17 16:33:07 +09:00
Author: https://github.com/GeekFiftyFive
Commit: 8fee285d72
Pull-request: https://github.com/SerenityOS/serenity/pull/13337
Reviewed-by: https://github.com/IdanHo ✅
1 changed files with 2 additions and 0 deletions
|
@ -41,6 +41,8 @@ ByteBuffer HttpRequest::to_raw_request() const
|
|||
}
|
||||
builder.append(" HTTP/1.1\r\nHost: ");
|
||||
builder.append(m_url.host());
|
||||
if (m_url.port().has_value())
|
||||
builder.appendff(":{}", *m_url.port());
|
||||
builder.append("\r\n");
|
||||
for (auto& header : m_headers) {
|
||||
builder.append(header.name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue