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

Handle error page correctly #205

Closed
teeann opened this issue Apr 2, 2019 · 0 comments
Closed

Handle error page correctly #205

teeann opened this issue Apr 2, 2019 · 0 comments

Comments

@teeann
Copy link
Contributor

teeann commented Apr 2, 2019

Status code and server header are not preserved when snare returns error page.

Steps to reproduce

  1. sudo clone --target http://example.com
  2. sudo snare --port 8080 --page-dir example.com
  3. curl --head http://localhost:8080/notfound. Response:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 1237
Date: Mon, 01 Apr 2019 16:49:00 GMT
Server: Python/3.6 aiohttp/3.4.4

Server header should be nginx, and status code should be 404

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

1 participant