Skip to content

Multiple forward slashes in request URL cause unexpected issues #80

Closed

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

Activity

  1. added
    bug
    on Jul 4, 2025
  2. brokuka commented on Sep 14, 2025

    @brokuka

    any update on this?

  3. added a commit that references this issue on Feb 20, 2026
    18e4d0d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions