Skip to content

Filenames containing the hash character (#) does not get this character encoded in the URL #566

@ericvillemure

Description

@ericvillemure

Here are the steps to reproduce:
in Windows command line:

C:\Users\xxx\temp>echo Hello > world#.txt

C:\Users\xxx\temp>npx serve

   ┌──────────────────────────────────────────────────┐
   │                                                  │
   │   Serving!                                       │
   │                                                  │
   │   - Local:            http://localhost:62677     │
   │   - On Your Network:  http://10.0.75.1:62677     │
   │                                                  │
   │   This port was picked because 5000 is in use.   │
   │                                                  │
   │   Copied local address to clipboard!             │
   │                                                  │
   └──────────────────────────────────────────────────┘

Open your browser and click on the world#.txt fileyou will get a 404 error. This is because the hash key is not url encoded. The correct URL should have been http://localhost:62677/world%23.txt instead of http://localhost:62677/world#.txt

In fact if you manually change the URL to http://localhost:62677/world%23.txt it will work and display Hello

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions