-
Notifications
You must be signed in to change notification settings - Fork 96
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
Encoding issue when using JRuby #18
Comments
This appears to be a bug in the require 'http/parser'
bytes = [ 71, 69, 84, 32, 47, 32, 72, 84, 84, 80, 47, 49, 46, 49, 13, 10, 85,
112, 103, 114, 97, 100, 101, 58, 32, 87, 101, 98, 83, 111, 99, 107,
101, 116, 13, 10, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 58,
32, 85, 112, 103, 114, 97, 100, 101, 13, 10, 72, 111, 115, 116, 58,
32, 108, 111, 99, 97, 108, 104, 111, 115, 116, 58, 55, 48, 48, 49,
13, 10, 79, 114, 105, 103, 105, 110, 58, 32, 104, 116, 116, 112, 58,
47, 47, 108, 111, 99, 97, 108, 104, 111, 115, 116, 58, 55, 48, 48,
49, 13, 10, 83, 101, 99, 45, 87, 101, 98, 83, 111, 99, 107, 101, 116,
45, 75, 101, 121, 49, 58, 32, 49, 57, 32, 111, 49, 55, 32, 54, 50,
32, 52, 32, 53, 50, 13, 10, 83, 101, 99, 45, 87, 101, 98, 83, 111,
99, 107, 101, 116, 45, 75, 101, 121, 50, 58, 32, 79, 52, 32, 48, 97,
103, 39, 53, 121, 57, 32, 32, 72, 32, 54, 60, 32, 54, 101, 32, 57,
49, 50, 13, 10, 13, 10,
# these bytes are the upgrade data:
241, 188, 139, 76, 196, 155, 103, 64 ]
string = bytes.pack('C*')
parser = Http::Parser.new
parser << string
p [parser.upgrade?, parser.upgrade_data.bytes.to_a] This script prints the correct upgrade data on MRI, but not on JRuby:
|
I've filed a bug with |
Thanks a lot! ❤️ |
I'm closing this issue since the bug has been shown to originate in another library. Please let me know if this proves counterproductive and we need to work around the bug in this library. |
I'm facing an encoding compatibility error when trying to use faye-websocket with Goliath server in JRuby 1.7.3 (1.9 mode)
The text was updated successfully, but these errors were encountered: