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 2013/10/31 00:31:00 UTC

[Bug 55725] New: BSF PostProcessor encodeURIComponent doesn't encode '+' character

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

            Bug ID: 55725
           Summary: BSF PostProcessor encodeURIComponent doesn't encode
                    '+' character
           Product: JMeter
           Version: 2.8
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTTP
          Assignee: issues@jmeter.apache.org
          Reporter: cpitzak@gmail.com

Hello, 

I'm using JMeter 2.8 r1393162. 

I'm using the BSF PostProcessor and selecting 'Javascript' as the language with
the following code in the script textbox: 
//... 
vars.put("app_id0", encodeURIComponent(json[0].id)); 
//... 

When json[0].id has a '+' character the encodeURIComponent does not encode it
to '%xx' 

encodeURIComponent def:
http://www.w3schools.com/jsref/jsref_encodeuricomponent.asp
And example:
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_encodeuricomponent

The workaround was to use the following code: 
//... 
vars.put("app_id0", encodeURIComponent(json[0].id).replace("+","%xx")); 
//...

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

[Bug 55725] BSF PostProcessor encodeURIComponent doesn't encode '+' character

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om
         Resolution|---                         |WORKSFORME

--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Closing as no feedback received and as per sebb message it works

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

[Bug 55725] BSF PostProcessor encodeURIComponent doesn't encode '+' character

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Sebb <se...@apache.org> ---
Works OK for me.

What is the exact value of json[0].id ?

Try using:

vars.put("app_id0raw", json[0].id);

and see what the values of the variables are using a Debug Sampler.

BTW, 2.8 is quite old; 2.10 is out now.

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

[Bug 55725] BSF PostProcessor encodeURIComponent doesn't encode '+' character

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

Clint Pitzak <cp...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Hardware|PC                          |Macintosh
                 OS|                            |All

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