1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

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

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