You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2012/07/11 11:10:18 UTC

[Bug 53534] New: Wrong escaping in POST requests with parameters

https://issues.apache.org/bugzilla/show_bug.cgi?id=53534

          Priority: P2
            Bug ID: 53534
          Assignee: issues@jmeter.apache.org
           Summary: Wrong escaping in POST requests with parameters
          Severity: normal
    Classification: Unclassified
          Reporter: gyurkin@gmail.com
          Hardware: PC
            Status: NEW
           Version: 2.7
         Component: Main
           Product: JMeter

In Recording controller try to use variables (like ${userId}) in body of
request.

The variable is inserted correctly but if body contains json with xml string
not all symbols escaping correctly.

Example:
The prototype of request body looks like:

{"userId": "${userId}", "Value":"{\"Data\":\"<Data>\\n  <Var
key=\\\"updatedArrowsTip\\\" val=\\\"1333110704230\\\"/>.....

1. Expected request body:
{"userId": "123456", "Value":"{\"Data\":\"<Data>\\n  <Var
key=\\\"updatedArrowsTip\\\" val=\\\"1333110704230\\\"/>.....

2. Real request body:
{"userId": "123456", "Value":"{\"Data\":\"<Data>\\n  <Var
key=\\"updatedArrowsTip\\" val=\\"1333110704230\\"/>.....

NOTE: after inserting the userId variable 

key=\\\" 

was replaced with

key=\\"

NOTE: in case when body does not contain any variable all works correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53534] Wrong escaping in POST requests with parameters

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53534

Sebb <se...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Sebb <se...@apache.org> ---
This is not really anything to do with POST requests; it is a feature of
function parsing as handled by FunctionParser.compileString(String).

Backslash is used as an escape character for the function meta-characters '$'
',' and '\'.

At present, one has to double up any backslash characters if a string contains
a function reference.

It's a non-trivial mattter to fix this, and any fix would break existing code.

See the coloured note towards the end of the following section:

http://jmeter.apache.org/usermanual/functions.html#how

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53534] Wrong escaping in POST requests with parameters

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53534

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lpinkowski@future-processin
                   |                            |g.com

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
*** Bug 54832 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53534] Wrong escaping in POST requests with parameters

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53534

--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Created attachment 29065
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29065&action=edit
Test Plan showing issue

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 53534] Wrong escaping in POST requests with parameters

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=53534

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
           Hardware|PC                          |All
                 OS|                            |All

-- 
You are receiving this mail because:
You are the assignee for the bug.