[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14591729#comment-14591729 ] Andrew Stitcher commented on PROTON-915: The current implementation will send AMQP open and close frames upon SASL header error though and the above discussion would imply that only SASL frames are be valid. [BTW I think it extremely complex to test that any bytes after a header before the socket is closed are in fact valid for the protocol of the header. unless you do full protocol decoding] Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14591738#comment-14591738 ] Gordon Sim commented on PROTON-915: --- So it sends the SASl header, then no SASL frames and no plain AMQP header before the open (and close) frames? That would indeed be a violation of the spec. (However sending a SASL headers, one or more SASL frames, then an AMQP header and then AMQP frames would be ok in my view). Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14591650#comment-14591650 ] Rafael H. Schloming commented on PROTON-915: FWIW, the intent of the spec was to allow both the client *and* the server to send things after the header. Obviously for the server this is only feasible if it only speaks one version, but it is allowed by the spec and should be handled by clients. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14591587#comment-14591587 ] Robbie Gemmell commented on PROTON-915: --- I think it could be argued either way as it isnt necessarily strictily stated and the first bit you quoted further makes it muddy, but I think it is strongly implied that you dont send more bytes. E.g a couple of the other points in the section/list you quoted at http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-transport-v1.0-os.html#section-version-negotiation (and the related ascii art) read to me as saying 'send more if the header is supported, dont send more if it isnt': {quote} If the requested protocol version is supported, the server MUST send its own protocol header with the requested version to the socket, and then proceed according to the protocol definition. If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. {quote} Of course, this is all further complicated by SASL vs non-SASL, which is the same protocol 'version' but with a different 'id'. That only seems to be covered by Figure 2.13, but reads similarly to me as saying 'send the header and nothing else'. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14591514#comment-14591514 ] Gordon Sim commented on PROTON-915: --- The spec says: Any data appearing beyond the protocol header MUST match the version indicated by the protocol header also Note that if the server only supports a single protocol version, it is consistent with the above rules for the server to send its protocol header prior to receiving anything from the client and to subsequently close the socket if the client’s protocol header does not match the server’s. So I would argue that the current behaviour does not violate the spec. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590432#comment-14590432 ] Andrew Stitcher commented on PROTON-915: Assigned to [~rhs] for comment on spec compliance Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590430#comment-14590430 ] Andrew Stitcher commented on PROTON-915: I have a fix for this now - try the attached patch. However this fails the current tests, because proton-j (and proton-c in client mode) ignore the spec and send the AMQP header followed by and open and immediate close frame. Which I don't think is allowed as the spec says *MUST* ... and then close the socket. You could argue that the spec doesn't forbid bytes between the coirrect header and closing the socket, but I think that's a stretch. I can make the test less restrictive if that is the consensus here, but I think there may be a larger spec compliance issue. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Andrew Stitcher Priority: Blocker Fix For: 0.10 The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590765#comment-14590765 ] ASF subversion and git services commented on PROTON-915: Commit 3aab9a07bca507aa9160e00eb54179b3df441ebb in qpid-proton's branch refs/heads/master from [~astitcher] [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=3aab9a0 ] PROTON-915: Send correct AMQP header upon protocol mismatch - Split apart the transport tests into client and server tests Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590772#comment-14590772 ] Andrew Stitcher commented on PROTON-915: I've now committed the patch, with fixes to the tests to allow them to pass but I think the open question is still whether the Proton-J behaviour and the Proton-C client transport behaviour is correct according to the spec. [Another JIRA perhaps?] Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590579#comment-14590579 ] Andrew Stitcher commented on PROTON-915: [~gemmellr] I think this was a deliberate move from @rhs which is why I've asked him to comment - at least in the Proton-C code. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590567#comment-14590567 ] Robbie Gemmell commented on PROTON-915: --- I'd agree that you could possibly argue whether the spec doesnt strictly forbids you sending any more bytes, but I do think it is the intention and would say we should not. If it was for example the non-SASL AMQP header that was received and 'not supported' because we were requiring a SASL layer first, then it would certainly seem incorrect to me send anything beyond the SASL header back. Incidentally, we should probably cover that case with tests too. For proton-j at least, the sending of the open and close frames could be related or even the same underlying issue as another I raised recently, PROTON-900. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590589#comment-14590589 ] Robbie Gemmell commented on PROTON-915: --- [~astitcher] Always a good idea. I was mainly just commenting to link the other JIRA in case someone who understands it cared to fix both :D Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Rafael H. Schloming Priority: Blocker Fix For: 0.10 Attachments: 0001-PROTON-915-Send-correct-AMQP-header-upon-protocol-mi.patch The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590077#comment-14590077 ] Gordon Sim commented on PROTON-915: --- E.g. 1. start wireshark 2. run ./examples/c/messenger/recv 3. run qpid-send --address foo Observe wireshark trace which shows qpid-cpp sending the 0-10 header and proton not sending one back. If use the recv example from proton 0.8 (in a slightly different path, ./examples/messenger/c/recv) a protocol-header *is* sent. You can substitute any other tcp server using proton-c for managing protocol version headers in step 2, e.g. dispatch router, examples/python/broker.py etc) Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Andrew Stitcher Priority: Blocker Fix For: 0.10 The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (PROTON-915) Incompatible protocol header handled incorrectly
[ https://issues.apache.org/jira/browse/PROTON-915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14590056#comment-14590056 ] Andrew Stitcher commented on PROTON-915: A reproducer script would be nice. Incompatible protocol header handled incorrectly Key: PROTON-915 URL: https://issues.apache.org/jira/browse/PROTON-915 Project: Qpid Proton Issue Type: Bug Components: proton-c Affects Versions: 0.9, 0.9.1 Reporter: Gordon Sim Assignee: Andrew Stitcher Priority: Blocker Fix For: 0.10 The correct response is to send back a supported header[1] before closing the socket. This worked for 0.8 but is broker from 0.9 onwards, I believe by this commit: https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;a=commit;h=1b2be03c748ef5a57cf181f8373b9b6e8f8cfd22 It means anything relying on proton-c for protocol header handling is not compliant with the spec. [1] section 2.2 of spec: If the requested protocol version is not supported, the server MUST send a protocol header with a supported protocol version and then close the socket. -- This message was sent by Atlassian JIRA (v6.3.4#6332)