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 2020/06/15 04:54:09 UTC

[Bug 64523] New: cURL Import : Query parameters should be added in 'Parameters' section instead of request path.

https://bz.apache.org/bugzilla/show_bug.cgi?id=64523

            Bug ID: 64523
           Summary: cURL Import : Query parameters should be added in
                    'Parameters' section instead of request path.
           Product: JMeter
           Version: 5.3
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: dineshbiradar95@gmail.com
  Target Milestone: JMETER_5.3.1

Created attachment 37313
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37313&action=edit
Query parameters added in request path

Steps to Reproduce :
- Click on "Import from cURL" option.

- Enter below GET request into "Create Test Plan from cURL" text box

curl
'https://completion.amazon.com/api/2017/suggestions?session-id=131-1551655-4391227&customer-id=&request-id=QN2EE4PFV5S1A9W82RE5&page-type=Gateway&lop=en_US&site-variant=desktop&client-info=amazon-search-ui&mid=ATVPDKIKX0DER&alias=aps&b2b=0&fresh=0&ks=80&prefix=laptop&event=onKeyPress&limit=11&fb=1&suggestion-type=KEYWORD&suggestion-type=WIDGET&_=1592195899512'
\
  -H 'Connection: keep-alive' \
  -H 'Accept: application/json, text/javascript, */*; q=0.01' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36' \
  -H 'Origin: https://www.amazon.com' \
  -H 'Sec-Fetch-Site: same-site' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Referer: https://www.amazon.com/' \
  -H 'Accept-Language: en-US,en;q=0.9' \
  --compressed

- Click on "Create Test Plan" button.
- Observe that : 
-- Request get parsed correctly but all the query parameters are added into the
request path
-- The query parameters should be added into 'Parameters' section as key-value
pair, so it will be easier for the user to update their values.

Expected Result :
- Query parameters should be added in 'Parameters' section instead of request
'Path' after cURL import.

Actual Result :
- Query parameters get added in request 'Path' after cURL import.

Screenshot : query_params_added_in_path.png

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

[Bug 64523] cURL Import : Query parameters should be added in 'Parameters' section instead of request path.

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

--- Comment #2 from Felix Schumacher <fe...@internetallee.de> ---
Created attachment 37852
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37852&action=edit
Decode query params for GET when parsing curl command

This patch tries to parse the URL and add a form field for each query param. It
seems to work when combined with the GET method.

However, I am not sure, whether the assumption to parse the query params using
UTF-8 is OK and it could lead to strange resuls, when path parameters
(separated by ';') are used.

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

[Bug 64523] cURL Import : Query parameters should be added in 'Parameters' section instead of request path.

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

eR@SeR <na...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from eR@SeR <na...@gmail.com> ---
Thumbs up for the improvement. Similar issue is opened here
https://bz.apache.org/bugzilla/show_bug.cgi?id=65274

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