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

Conflicts with rack-mini-profiler #10

Open
bradleybuda opened this issue Aug 7, 2013 · 2 comments
Open

Conflicts with rack-mini-profiler #10

bradleybuda opened this issue Aug 7, 2013 · 2 comments

Comments

@bradleybuda
Copy link
Contributor

When using this in conjunction with rack-mini-profiler (and potentially other gems that modify response bodies) there's an escaping issue.

@jonuhal
Copy link

jonuhal commented Aug 9, 2013

I am having this issue as well. Rack-mini-profiler is injecting itself into the page twice instead of once and the second script tag is escaped. It's around the length-hiding call because the mini-profiler scripts (the first one is an actual function script tag, the second is an escaped string that shows up on the web page) have the "This is a random-length HTML comment: ..." between them.

@bradleybuda
Copy link
Contributor Author

@jonuhal Exactly what I'm seeing. I think this might be a bug in Rack-mini-profiler; it tries to inject itself in every chunk of the Rack response, and since the length-hider adds a second chunk to the response, the JS shows up twice.

We're using a hacked-at version of MiniProfiler to get around this for now, that probably needs be turned into a proper patch.

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