Skip to content

relative redirects: url_canonicalize_port has no default without a scheme #2851

Description

@d2r

This might not be a bug.

inline int
url_canonicalize_port(int type, int port)
{
if (port == 0) {
if (type == URL_TYPE_HTTP)
port = 80;
else if (type == URL_TYPE_HTTPS)
port = 443;
}
return (port);
}

When following redirects, if a relative redirect is returned without a scheme (or a host name), then this code cannot choose a port number to use when following the redirect.

It might be good if ATS would be updated to be smarter when following such redirects (use the previous client request's scheme/port).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions