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

Problem in serving a site #183

Closed
rnehra01 opened this issue Mar 3, 2019 · 5 comments
Closed

Problem in serving a site #183

rnehra01 opened this issue Mar 3, 2019 · 5 comments

Comments

@rnehra01
Copy link
Collaborator

rnehra01 commented Mar 3, 2019

If a website is clone using https://example.com/ then snare gives error while serving but if cloned using https://example.com then works fine.

Traceback (most recent call last):
  File "/home/rnehra/anaconda3/envs/snare/bin/snare", line 4, in <module>
    __import__('pkg_resources').run_script('Snare==0.3.0', 'snare')
  File "/home/rnehra/anaconda3/envs/snare/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/rnehra/anaconda3/envs/snare/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1453, in run_script
    exec(script_code, namespace, namespace)
  File "/home/rnehra/anaconda3/envs/snare/lib/python3.7/site-packages/Snare-0.3.0-py3.7.egg/EGG-INFO/scripts/snare", line 205, in <module>
  File "/home/rnehra/anaconda3/envs/snare/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/rnehra/anaconda3/envs/snare/lib/python3.7/site-packages/Snare-0.3.0-py3.7.egg/snare/server.py", line 91, in start
KeyError: '/status_404'

That means if / is present in then end of target URL then it causes an error.

@sannanansari
Copy link

sannanansari commented Mar 3, 2019

I am not getting error while cloning https://example.com/
screenshot from 2019-03-03 22-52-42
Just getting extra / in status404

@rnehra01
Copy link
Collaborator Author

rnehra01 commented Mar 3, 2019

Sorry, while serving the website using snare.

@rnehra01 rnehra01 changed the title Problem in cloning a site Problem in serving a site Mar 3, 2019
@amanjiofficial
Copy link
Contributor

@rnehra01 Can we specify conditions to check the presence of any path in the url by yarl api and then accordingly add '/status_404' or 'status_404' in cloner file?

@rnehra01
Copy link
Collaborator Author

rnehra01 commented Mar 7, 2019

Yeah. Or we can modify the URL and always add one of them

@amanjiofficial
Copy link
Contributor

@rnehra01 I have made the required changes and sent a PR .

This was referenced Feb 28, 2020
@afeena afeena mentioned this issue Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants