You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by "Lionel Cons (JIRA)" <ji...@apache.org> on 2012/08/29 15:21:07 UTC
[jira] [Created] (APLO-255) Typo and weird exception text in
StompCodec.scala
Lionel Cons created APLO-255:
--------------------------------
Summary: Typo and weird exception text in StompCodec.scala
Key: APLO-255
URL: https://issues.apache.org/jira/browse/APLO-255
Project: ActiveMQ Apollo
Issue Type: Bug
Environment: apollo-99-trunk-20120829.114214-107
Reporter: Lionel Cons
Priority: Minor
While interacting with the broker via telnet, Apollo complained with:
]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
The ] at the beginning is weird, this comes from a control character (^M) being logged.
The invalid data should be properly escaped before being turned into an exception. Here is the current code:
throw new IOException("Unable to parser header line [" + line + "]")
Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (APLO-255) Typo and weird exception text in
StompCodec.scala
Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/APLO-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452499#comment-13452499 ]
Christian Posta commented on APLO-255:
--------------------------------------
I see Hiram committed the fix for escaping the exception and fixing the typo (r1378607)...
On my side, I cannot connect with telnet. The connection terminates when trying to send this frame:
CONNECT
accept-version:1.1
login:admin
passcode:password
^@
A little digging led to this... The telnet client is sending end-of-lines as \r\n
When the StompCodec tries to parse this in the apply() function that's defined in the read_headers(...) function, it tries to move to the tail of the line (line.moveTail(-1)
The Buffer object's moveTail method adds the parameter (-1) to the length of the line. So for \n it works fine (the line.length is effectively zero: true length of "1" + the parameter "-1"), but for \r\n, the effective length is '1' (2 + -1). So the apply method continues on trying to parse the header.... which will be wrong.
Hiram, any suggestion on how the Buffer class should determine the tail?
> Typo and weird exception text in StompCodec.scala
> -------------------------------------------------
>
> Key: APLO-255
> URL: https://issues.apache.org/jira/browse/APLO-255
> Project: ActiveMQ Apollo
> Issue Type: Bug
> Environment: apollo-99-trunk-20120829.114214-107
> Reporter: Lionel Cons
> Priority: Minor
> Attachments: APLO-255_connect_as_telnet.patch
>
>
> While interacting with the broker via telnet, Apollo complained with:
> ]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
> The ] at the beginning is weird, this comes from a control character (^M) being logged.
> The invalid data should be properly escaped before being turned into an exception. Here is the current code:
> throw new IOException("Unable to parser header line [" + line + "]")
> Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (APLO-255) Typo and weird exception text in
StompCodec.scala
Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/APLO-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453089#comment-13453089 ]
Hiram Chirino commented on APLO-255:
------------------------------------
Hi Christian.. could you open a separate issue for that. Fixing this 'correctly' might take a spec update. see: https://groups.google.com/d/topic/stomp-spec/SjlWAO9rhBc/discussion
> Typo and weird exception text in StompCodec.scala
> -------------------------------------------------
>
> Key: APLO-255
> URL: https://issues.apache.org/jira/browse/APLO-255
> Project: ActiveMQ Apollo
> Issue Type: Bug
> Environment: apollo-99-trunk-20120829.114214-107
> Reporter: Lionel Cons
> Priority: Minor
> Attachments: APLO-255_connect_as_telnet.patch
>
>
> While interacting with the broker via telnet, Apollo complained with:
> ]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
> The ] at the beginning is weird, this comes from a control character (^M) being logged.
> The invalid data should be properly escaped before being turned into an exception. Here is the current code:
> throw new IOException("Unable to parser header line [" + line + "]")
> Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (APLO-255) Typo and weird exception text in
StompCodec.scala
Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/APLO-255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiram Chirino updated APLO-255:
-------------------------------
Component/s: apollo-stomp
Fix Version/s: 1.5
Assignee: Hiram Chirino
> Typo and weird exception text in StompCodec.scala
> -------------------------------------------------
>
> Key: APLO-255
> URL: https://issues.apache.org/jira/browse/APLO-255
> Project: ActiveMQ Apollo
> Issue Type: Bug
> Components: apollo-stomp
> Environment: apollo-99-trunk-20120829.114214-107
> Reporter: Lionel Cons
> Assignee: Hiram Chirino
> Priority: Minor
> Fix For: 1.5
>
> Attachments: APLO-255_connect_as_telnet.patch
>
>
> While interacting with the broker via telnet, Apollo complained with:
> ]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
> The ] at the beginning is weird, this comes from a control character (^M) being logged.
> The invalid data should be properly escaped before being turned into an exception. Here is the current code:
> throw new IOException("Unable to parser header line [" + line + "]")
> Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (APLO-255) Typo and weird exception text in
StompCodec.scala
Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/APLO-255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Posta updated APLO-255:
---------------------------------
Attachment: APLO-255_connect_as_telnet.patch
Added a test case that reproduces failing to connect when using "\r\n" as the line terminator
> Typo and weird exception text in StompCodec.scala
> -------------------------------------------------
>
> Key: APLO-255
> URL: https://issues.apache.org/jira/browse/APLO-255
> Project: ActiveMQ Apollo
> Issue Type: Bug
> Environment: apollo-99-trunk-20120829.114214-107
> Reporter: Lionel Cons
> Priority: Minor
> Attachments: APLO-255_connect_as_telnet.patch
>
>
> While interacting with the broker via telnet, Apollo complained with:
> ]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
> The ] at the beginning is weird, this comes from a control character (^M) being logged.
> The invalid data should be properly escaped before being turned into an exception. Here is the current code:
> throw new IOException("Unable to parser header line [" + line + "]")
> Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (APLO-255) Typo and weird exception text in
StompCodec.scala
Posted by "Christian Posta (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/APLO-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453128#comment-13453128 ]
Christian Posta commented on APLO-255:
--------------------------------------
Thanks Hiram. I've opened APLO-259
> Typo and weird exception text in StompCodec.scala
> -------------------------------------------------
>
> Key: APLO-255
> URL: https://issues.apache.org/jira/browse/APLO-255
> Project: ActiveMQ Apollo
> Issue Type: Bug
> Environment: apollo-99-trunk-20120829.114214-107
> Reporter: Lionel Cons
> Priority: Minor
> Attachments: APLO-255_connect_as_telnet.patch
>
>
> While interacting with the broker via telnet, Apollo complained with:
> ]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
> The ] at the beginning is weird, this comes from a control character (^M) being logged.
> The invalid data should be properly escaped before being turned into an exception. Here is the current code:
> throw new IOException("Unable to parser header line [" + line + "]")
> Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (APLO-255) Typo and weird exception text in
StompCodec.scala
Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/APLO-255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hiram Chirino resolved APLO-255.
--------------------------------
Resolution: Fixed
> Typo and weird exception text in StompCodec.scala
> -------------------------------------------------
>
> Key: APLO-255
> URL: https://issues.apache.org/jira/browse/APLO-255
> Project: ActiveMQ Apollo
> Issue Type: Bug
> Components: apollo-stomp
> Environment: apollo-99-trunk-20120829.114214-107
> Reporter: Lionel Cons
> Assignee: Hiram Chirino
> Priority: Minor
> Fix For: 1.5
>
> Attachments: APLO-255_connect_as_telnet.patch
>
>
> While interacting with the broker via telnet, Apollo complained with:
> ]012-08-29 15:08:00,619 Shutting connection 'null' down due to: java.io.IOException: Unable to parser header line [ascii:
> The ] at the beginning is weird, this comes from a control character (^M) being logged.
> The invalid data should be properly escaped before being turned into an exception. Here is the current code:
> throw new IOException("Unable to parser header line [" + line + "]")
> Then you may want to s/to parser/to parse/g.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira