Skip to content

Static files. Spaces in path. #839

Closed

Description

@manfredmann

When static path contains spaces, server returns 404 error.

Code:

  e := echo.New()
  e.Static("/storage", config.Main.StorageDir); //config.Main.StorageDir contains string "storage"
  e.GET("/", api.Index)
....
Some e.POST
....
  err = e.Start(fmt.Sprintf("%s:%d", config.Main.ServerListen, config.Main.ServerPort))

"storage" directory structure for example:

storage/1.txt //Contains record "1"
storage/1 1.txt //Contains record "1 1"
manfredmann@lucille ~/G/mhapiserver> curl "http://localhost:3000/storage/1.txt"
1
manfredmann@lucille ~/G/mhapiserver> curl "http://localhost:3000/storage/1%201.txt"
{"message":"Not Found"} 
manfredmann@lucille ~/G/mhapiserver>

Activity

  1. self-assigned this
    on Mar 15, 2017
  2. added a commit that references this issue on Apr 23, 2025
    477d8dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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