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
Unexpected character in root json response #130
Comments
hmm this is odd @hntd187 do you have any idea of what is going on? |
My guess is a leak of some sort, maybe in unsafe code? I don't know. Rust allowing garbage to be thrown somewhere is very unusual. As I've said, removing the Deflate middleware seems to solve the problem. |
@mauri870 that is strange, I won't have time this week to see if I can isolate this. but that would probably be the best action forward and then we can bring it up with carl who wrote tower-web. |
hmm yea that's super odd, yea, its probably best to remove the deflate until we can pin that down it seems like an off by 1 error in whatever buffer deflate uses or the buffer isn't cleared entirely on request. I'm not sure I'll have to investigate as well. |
Well guys, I tried to recreate the same scenario as the root handler and use the deflate middleware with a new tower-web project and I can't reproduce the issue. I'ts definetely related to some weird thing in toshi. |
Nvm, it's related to tower-web. I'll open an issue and link to here. |
Well, that's unfortunate. I just forget to add |
After issuing the command
curl -X GET http://localhost:8080 -output -
the following response is returned by toshi:){"name":"Toshi Search","version":"0.1.1"}
As you can see, this is invalid json, there's an aditional character at the start of the response and it vary between:
-
,+
,,
,)
, etc. I don't know why it's returning this, seems like garbage to me. Removing the Deflate middleware somehow solves the problem. If you try to change thename
in ToshiInfo the initial byte changes too, pretty strange.The text was updated successfully, but these errors were encountered: