Skip to content

http.DefaultServeMux breaks some signed urls #215

Closed
@bigshahan

Description

The following commit, currently on master and not released yet, breaks some urls:

Commit: 3b85073
log.Fatal(server.ListenAndServe()) -> log.Fatal(http.ListenAndServe(*addr, nil))

An example url that breaks:
https://imageproxy/signature=/https://domain//proxied.png

It breaks, because the DefaultServeMux, performs url sanitization, which redirects the url to:
https://imageproxy/signature=/https:/domain/proxied.png

A possible solution for those that want to run the profiler would be to run the profiler on a different port number, or opt-in into this behavior. Or a change to how the signing is performed. Alternative would be just undo that commit. I'm happy to help out with a PR.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions