Autoresponder and regex

3 posts, 0 answers
  1. Thomas
    Thomas avatar
    2 posts
    Member since:
    Oct 2014

    Posted 31 Oct 2014 Link to this post

    Hello,

    I'm using Fiddler 4.4.9.6 and I'm trying to make the autoresponder use a file as a response with a regex rule.
    The regex part is ok but it sends back a 403 error when using full URLs and local files.
    The only way I can make it work is by using a relative URL and that's because it automatically adds a forward slash (/) to the response.

    So:

    - http://www.example.com doesn't work
    - C:/mystuff/stuff.json doesn't work
    - relativeurl/stuff.json does work

    Any ideas?
    Thanks!
  2. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 31 Oct 2014 Link to this post

    Hello, Thomas--

    Can you please provide the full rule (both the "If request matches..." and "then respond with" columns)? You can copy these by selecting the rule in the list and hitting CTRL+C to copy them to your clipboard.

    My guess (based only on past errors) is that you've written a regular expression that does not fully encompass the URL, and thus the resulting filename is invalid.

    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Thomas
    Thomas avatar
    2 posts
    Member since:
    Oct 2014

    Posted 03 Nov 2014 in reply to Eric Lawrence Link to this post

    Huh, you're right, that was it!

    I had just specified :

    urlmethod.*type=param$

    instead of

    .*urlmethod.*type=param$

    Thanks :)
Back to Top