URL: No need to include ":80" when serializing http:// URLs

This commit is contained in:
Andreas Kling 2019-10-10 22:06:25 +02:00
parent c294c97cdf
commit bf5a65d934
Notes: sideshowbarker 2024-07-19 11:44:15 +09:00

View file

@ -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();