Bug 743957 - White spaces cannot be used in the value of "field-table" argument type
Summary: White spaces cannot be used in the value of "field-table" argument type
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-tools
Version: Development
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-06 15:12 UTC by Petr Matousek
Modified: 2020-11-04 18:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Matousek 2011-10-06 15:12:04 UTC
Description of problem:

The map supplied as a value to "field-table" argument type in the qpid-tool method call cannot contain white spaces.

I've realised this during testing the new argument (filter) of queue purge/reroute methods. (svn development branch qpid-3346)

{"filter_type":"header_match_str", "filter_params": {"header_key":"GroupId", "header_value":"BadWolf"}} 

causes Exception in do_call: %r unexpected EOF while parsing (line 1) 

{"filter_type":"header_match_str","filter_params":{"header_key":"GroupId","header_value":"BadWolf"}}

is accepted.

Moreover a white space used in a string contained in the map causes another parsing error, ie. "header_value":"Bad Wolf" :

qpid: call <queueId> purge 1 {"filter_type":"header_match_str","filter_params":{"header_key":"GroupId","header_value":"Bad Wolf"}} 
Exception in do_call: %r EOL while scanning single-quoted string (line 1)

--

It can be demonstrated on already existing methods as well, ie:
qpid: call <brokerId> create queue q1 {'qpid.max_count':10} False
qpid: OK (0) - {}

qpid: call <brokerId> create queue q2 {'qpid.max_count': 10} False
Exception in do_call: %r unexpected EOF while parsing (line 1)

qpid: call <brokerId> create queue q3 {'qpid.max_count':"1 0"} False
Exception in do_call: %r EOL while scanning single-quoted string (line 1)

(in the last case something similar to following shall be outputted:
qpid: illegal-argument: Cannot convert qpid.max_count to unsigned integer)


Version-Release number of selected component (if applicable):
qpid-tools-0.10-6.el5

How reproducible:
100%

Steps to Reproduce:
1. run qpid-tool
2. call some method with field-table argument and supply a map containing some white spaces to that argument
  
Actual results:
parsing errors occurs if white space is used in the value of field-table argument types

Expected results:
White spaces are handled correctly in the value of field-table argument types

Additional info:


Note You need to log in before you can comment on or make changes to this bug.