Skip to content

Static files. Spaces in path. #839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
manfredmann opened this issue Feb 3, 2017 · 0 comments
Closed

Static files. Spaces in path. #839

manfredmann opened this issue Feb 3, 2017 · 0 comments
Assignees

Comments

@manfredmann
Copy link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants