diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-10-10 22:06:25 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-10-10 22:06:25 +0200 |
commit | bf5a65d934aad670d7d7b8635cd16200b3788ea3 (patch) | |
tree | 85fd9359dfb7b5d52b69cd6f24f6b4997f90dbc0 /AK/URL.cpp | |
parent | c294c97cdf95210a1bdb3700c63ae50d89caacb1 (diff) | |
download | serenity-bf5a65d934aad670d7d7b8635cd16200b3788ea3.zip |
URL: No need to include ":80" when serializing http:// URLs
Diffstat (limited to 'AK/URL.cpp')
-rw-r--r-- | AK/URL.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/AK/URL.cpp b/AK/URL.cpp index 0ddcecd170..dc5286e620 100644 --- a/AK/URL.cpp +++ b/AK/URL.cpp @@ -125,8 +125,10 @@ String URL::to_string() const builder.append("://"); if (protocol() != "file") { builder.append(m_host); - builder.append(':'); - builder.append(String::number(m_port)); + if (protocol() != "http" || port() != 80) { + builder.append(':'); + builder.append(String::number(m_port)); + } } builder.append(m_path); return builder.to_string(); |