[GH-ISSUE #257] unexpected path prefix #762

Closed
opened 2026-03-15 21:30:28 +03:00 by kerem · 3 comments
Owner

Originally created by @21888 on GitHub (Jul 20, 2022).
Original GitHub issue: https://github.com/hibiken/asynqmon/issues/257

http://localhost:8080/monitoring/
http://localhost:8080/

unexpected path prefix

What does he mean by launching directly as HTTP

Originally created by @21888 on GitHub (Jul 20, 2022). Original GitHub issue: https://github.com/hibiken/asynqmon/issues/257 http://localhost:8080/monitoring/ http://localhost:8080/ ``` unexpected path prefix ``` What does he mean by launching directly as HTTP
kerem closed this issue 2026-03-15 21:30:33 +03:00
Author
Owner

@fc221 commented on GitHub (Sep 26, 2022):

Brother, have you solved it? I have encountered similar problems

<!-- gh-comment-id:1258529109 --> @fc221 commented on GitHub (Sep 26, 2022): Brother, have you solved it? I have encountered similar problems
Author
Owner

@binary4cat commented on GitHub (Sep 27, 2022):

I'm currently having this problem.

<!-- gh-comment-id:1259033163 --> @binary4cat commented on GitHub (Sep 27, 2022): I'm currently having this problem.
Author
Owner

@pkierski commented on GitHub (Apr 7, 2023):

I guess you've tried to run it on Windows?

I've faced the same issue. It comes from exploiting filepath.Abs() here. On Windows filepath.Abs(r.URL.Path) transforms "/monitoring" to "c:\monitoring" which is correct absolute path in terms of filesystem, but in this place is invalid. The next check (is the path starting with asynqmon root?) fails.

filepath.Abs(r.URL.Path) should be replaced with filepath.ToSlash(filepath.Clean(r.URL.Path)). I'll try to prepare pull request for it.

<!-- gh-comment-id:1500372590 --> @pkierski commented on GitHub (Apr 7, 2023): I guess you've tried to run it on Windows? I've faced the same issue. It comes from exploiting `filepath.Abs()` [here](https://github.com/hibiken/asynqmon/blob/master/static.go#L32). On Windows `filepath.Abs(r.URL.Path)` transforms "/monitoring" to "c:\monitoring" which is correct absolute path in terms of filesystem, but in this place is invalid. The next check (is the path starting with asynqmon root?) fails. `filepath.Abs(r.URL.Path)` should be replaced with `filepath.ToSlash(filepath.Clean(r.URL.Path))`. I'll try to prepare pull request for it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynqmon#762
No description provided.