Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token based RESTful support ignores slashes #88

Closed
joshnhickman opened this issue Apr 30, 2015 · 2 comments
Closed

Token based RESTful support ignores slashes #88

joshnhickman opened this issue Apr 30, 2015 · 2 comments

Comments

@joshnhickman
Copy link

Steps to reproduce:

  1. Create two Services (or import the XML below)
    1. Test1: /id/{ID}/test responds with "Test1"
    2. Test2: /id/{ID1}/otherid/{ID2}/test responds with "Test2"
  2. Navigate to http://127.0.0.1:8080/service/id/1/otherid/2/test

The expected behavior is for Mockey to return "Test2", but instead it returns "Test1". Test1 is matching because the {ID} token is being set as 1/otherid/2, instead of the value between the slashes.

Mockey Export:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<mockservice version="1.0" xml:lang="en-US">
<proxy_settings proxy_enabled="false" proxy_url=""/>
<service default_real_url_index="0" default_scenario_id="1" description="" error_scenario_id="null" hang_time="0" name="Test1" request_inspector_name="null" service_response_type="1" tag="" url="id/{ID}/test">
<request_inspector_json_rules enable_flag="false"/>
<response_schema enable_flag="false"/>
<scenario http_method_type="" http_resp_status_code="200" id="1" name="static" tag="">
<scenario_match scenario_match_evaluation_rules_flag="false"/>
<scenario_response><![CDATA[Test1]]></scenario_response>
<scenario_response_header/>
</scenario>
</service>
<service default_real_url_index="0" default_scenario_id="1" description="" error_scenario_id="null" hang_time="0" name="Test2" request_inspector_name="null" service_response_type="1" tag="" url="id/{ID1}/otherId/{ID2}/test">
<request_inspector_json_rules enable_flag="false"/>
<response_schema enable_flag="false"/>
<scenario http_method_type="" http_resp_status_code="200" id="1" name="static" tag="">
<scenario_match scenario_match_evaluation_rules_flag="false"/>
<scenario_response><![CDATA[Test2]]></scenario_response>
<scenario_response_header/>
</scenario>
</service>
</mockservice>
@clafonta
Copy link
Owner

clafonta commented May 5, 2015

@joshnhickman Thank you for the help; the export and issue insight. Greatly appreciated.

@joshnhickman
Copy link
Author

Of course! And thank you for the prompt fixes; it's very helpful to have these issues addressed so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants