Skip to content

Multiple forward slashes in request URL cause unexpected issues #80

@ImranR-TI

Description

@ImranR-TI

Environment

Node 22.14.0, httpxy 0.1.7

Reproduction

https://github.com/ImranR-TI/httpxy_multiple_fwslash_bug_minimal

  1. Run node server.js and node proxy.js
  2. Visit http://localhost:3005/, see Hello World! as expected
  3. Visit http://localhost:3005/test, see Test Page! as expected
  4. Visit http://localhost:3005//test (note the double forward slash //), see Hello World! instead of the expected Test Page! (almost like like the //test part of the request URL was cut off, not sure if that's what's actually happening).

Describe the bug

When the request being proxied has multiple consecutive forward slashes, the proxy seems to break and cut off the rest of the URL.

This doesn't happen with the latest (2018) version of the old http-proxy module, so that might be a clue.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions