Skip to content
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

Does not place nice with '/' (root) endpoint #22

Open
joshnatis opened this issue May 27, 2022 · 0 comments
Open

Does not place nice with '/' (root) endpoint #22

joshnatis opened this issue May 27, 2022 · 0 comments

Comments

@joshnatis
Copy link

Hey there, thanks for your great work on this plugin :).

Some weird stuff happens when I try to profile the / endpoint of my app (which happens to be the main endpoint, so I basically can't use the plugin lol). Check it out:

image

<ul>
    <li><a href="URL/nytprof/nytprof.out..24" "=""></a> (PID 24,Fri May 27 19:24:01 2022,0.2409 secs)</li>
    <li><a href="URL/nytprof/nytprof.out.checkstatus.25" "="">checkstatus</a> (PID 25,Fri May 27 19:20:41 2022,0.0092 secs)</li> 
    <li><a href="URL/nytprof/nytprof.out.swag.28" "="">swag</a> (PID 28,Fri May 27 19:20:36 2022,0.0004 secs)</li>
</ul>

I believe that can be attributed to this line: $path =~ s{^/}{};.

Now that I'm looking at the HTML there seem to be some other issues too. E.g. <a href="URL/nytprof/nytprof.out.checkstatus.25" "="">, not sure what's going on there...

I don't know what the best way to fix this would be, maybe replacing a path consisting only of a / with root? Seems hacky, I don't know if there's any sentinel value we can use that wouldn't conflict with possible endpoint names.

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

1 participant