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

Correct handling of UTF-8 data? #4

Open
robn opened this issue May 20, 2019 · 0 comments
Open

Correct handling of UTF-8 data? #4

robn opened this issue May 20, 2019 · 0 comments

Comments

@robn
Copy link
Owner

robn commented May 20, 2019

It has been seen that when a UTF-8 encoded character is present in a label (specifically ★ - U+02605 - BLACK STAR), a Plack server handling serving the output from the ->format method directly (not using the internal ->psgi method) is truncated by a few bytes. This suggests something isn't coping with a mismatch in octet vs character lengths.

The problem was actually seen in something using Prometheus::Tiny::Shared, so the "problem" could exist anywhere in:

  • shared cached freeze/thaw
  • metric insertion
  • output formatting
  • the surrounding web server

If possible, we should ensure that P::T's internal PSGI handler does the right thing here. If it does turn out to be entirely an application-level concern, then we should perhaps document some guidance for users. At the very least, I'd like to understand the problem.

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