Qpid
  1. Qpid
  2. QPID-3492

String values in address are parsed as binary (and sent as vbin16/32 rather than str16)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.12
    • Fix Version/s: 0.13, 0.15
    • Component/s: C++ Client
    • Labels:
      None

      Description

      E.g. when specifying arguments in x-bindings for a headers exchange, where this can cause problems.

      1. cqpid_perl_utf8.cpp
        3 kB
        Fraser Adams
      2. fix-addr-parser.patch
        0.5 kB
        Fraser Adams

        Activity

        Hide
        Fraser Adams added a comment -

        Attached updated patch for AddressParser.cpp

        Show
        Fraser Adams added a comment - Attached updated patch for AddressParser.cpp
        Hide
        Fraser Adams added a comment -

        This doesn't quite fix the problem. There is still an issue with quoted string values so an address like the following (which contains a mix of quoted and unquoted strings) fails:

        string address = "testqueue; {create: receiver, node: {x-declare: {arguments: {'qpid.policy_type': ring, 'qpid.max_size': 500000000}}, x-bindings: [{exchange: 'amq.match', queue: 'testqueue', key: 'data1', arguments: {x-match: all, data-service: 'amqp-delivery', item-owner: 'fadams'}}]}}";

        I've attached an updated patch.

        Show
        Fraser Adams added a comment - This doesn't quite fix the problem. There is still an issue with quoted string values so an address like the following (which contains a mix of quoted and unquoted strings) fails: string address = "testqueue; {create: receiver, node: {x-declare: {arguments: {'qpid.policy_type': ring, 'qpid.max_size': 500000000}}, x-bindings: [{exchange: 'amq.match', queue: 'testqueue', key: 'data1', arguments: {x-match: all, data-service: 'amqp-delivery', item-owner: 'fadams'}}] }}"; I've attached an updated patch.
        Hide
        Fraser Adams added a comment -

        Sorry - I messed up the order of my comments. I meant that Gordon's original patch didn't quite fix the problem but I hope that fix-addr-parser.patch does.

        Show
        Fraser Adams added a comment - Sorry - I messed up the order of my comments. I meant that Gordon's original patch didn't quite fix the problem but I hope that fix-addr-parser.patch does.
        Hide
        Fraser Adams added a comment -

        As a slight aside. I had a problem whereby I couldn't actually change the C++ client runtime library version in my deployment to incorporate a fix to AddressParser.cpp, so I wrote the attached which "patches" the Address object by iterating through until it reaches the bindings and explicitly sets their encoding.

        This is actually more of a faff than the changes needed to AddressParser.cpp but at that time it was easier to fix the user code than the library code....

        Show
        Fraser Adams added a comment - As a slight aside. I had a problem whereby I couldn't actually change the C++ client runtime library version in my deployment to incorporate a fix to AddressParser.cpp, so I wrote the attached which "patches" the Address object by iterating through until it reaches the bindings and explicitly sets their encoding. This is actually more of a faff than the changes needed to AddressParser.cpp but at that time it was easier to fix the user code than the library code....
        Hide
        Gordon Sim added a comment -

        Quoted strings not handled by original fix.

        Show
        Gordon Sim added a comment - Quoted strings not handled by original fix.

          People

          • Assignee:
            Gordon Sim
            Reporter:
            Gordon Sim
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development