How to replace an online folder by local folder?

4 posts, 0 answers
  1. Yevgeniy
    Yevgeniy avatar
    2 posts
    Member since:
    Sep 2019

    Posted 20 Sep Link to this post

    I'm struggling to make my browser fetch all files from local folder instead of all files from target online folder.
    I want to achieve it using Fiddler's AutoResponder.
    As I understood, I should write corresponding regular expressions for target online folder and for local folder as well. But I can't figure out how they should look. In another proxy debugger, Charles Proxy, it would be basically this easy:

    local path: c:\local_folder

    Same approach didn't work in Fiddler for me. Then I've found some example (https://groups.google.com/forum/#!topic/httpfiddler/BWfUoCuih8k) by Eric Lawrence, but either it is irrelevant, or I'm applying it incorrect. Anyway it doesn't work for me too. I've tried something like this:

    REGEX:C:\local_folder\$1

    So, please, give me a hint, how regexps for replacing whole folder (online) to whole folder (local) should be written in Fiddler.

    If there is another way beside regexps, I would like to know it as well.
    Thank you!

  2. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    230 posts

    Posted 24 Sep Link to this post

    Hi Yevgeniy,

    I am not certain that REGEX will be the best approach for this. There is a nice post on OhadSoft's blog about Mapping Network Resources to Local Files using Fiddler that may be helpful.

    I hope this helps. Please let me know if you need any additional information. Thank you for using the Fiddler Forums.

    Regards,


    Eric R | Technical Support Engineer
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Yevgeniy
    Yevgeniy avatar
    2 posts
    Member since:
    Sep 2019

    Posted 24 Sep in reply to Eric R | Technical Support Engineer Link to this post

    Thank you for your reply, Eric!
    I'm afraid, Mapping network resources to local files using Fiddler post doesn't fit in my case as there explained how to map single online file to single local file, so Fiddler is able to replace one by another - and I want to map whole folder at once.
    Example:

    1. There is some site "examplesite.com"
    2. This site includes folder named "target_folder", which contains this files:
    • picture1.jpg
    • picture2.jpg
    • code1.js
    • code2.js
    • configuration1.json
    • sound1.mp3

    I have copy of that folder on my pc. And I don't want to manually map in AutoResponder "picture1.jpg" (online) to "picture1.jpg" (local), then "picture2.jpg" (online) to "picture2.jpg" (local) etc. Because mapping file by file may be very time consuming, especially in case there are lot of files within folder.

    Instead of mapping file by file I want to give this instruction to AutoResponder:

    "when http response includes file, whose parent folder is "examplesite.com/target_folder", - replace it by same file from here "C:\local_folder" ".
    So then "picture1.jpg", "picture2.jpg", "code1.js", "code2.js", "configuration1.json" and "sound1.mp3" will be replaced by local files with same name and format automatically.

    I'm pretty sure that can be done using Fiddler's AutoResponder, but I don't know how exactly to do it.
    So, any suggestions would be much appreciated :)

  4. Eric R | Technical Support Engineer
    Admin
    Eric R | Technical Support Engineer avatar
    230 posts

    Posted 25 Sep Link to this post

    Hi Yevgeniy,

    Apologies for my misunderstanding. In this case, Regular Expressions might be the better approach. See the AutoResponder Regular Expressions Knowledge Base Article for more details.

    I hope this helps. Please let me know if you need any additional information. Thank you.

    Regards,


    Eric R | Technical Support Engineer
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top