From e2041948755c6cb92d1c147ec1a83029f4747315 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Mon, 26 Aug 2013 18:55:04 -0400 Subject: [PATCH] Use the right environment variables. --- copyvios/cookies.py | 2 +- pages/index.mako | 2 +- pages/settings.mako | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/copyvios/cookies.py b/copyvios/cookies.py index 659d130..7fcac54 100644 --- a/copyvios/cookies.py +++ b/copyvios/cookies.py @@ -9,7 +9,7 @@ class _CookieManager(SimpleCookie): MAGIC = "--cpv2" def __init__(self, environ): - self._path = path.split(environ["PATH_INFO"])[0] + self._path = path.dirname(environ["SCRIPT_NAME"]) try: super(_CookieManager, self).__init__(environ["HTTP_COOKIE"]) except (CookieError, KeyError): diff --git a/pages/index.mako b/pages/index.mako index 7fcfcf3..2614090 100644 --- a/pages/index.mako +++ b/pages/index.mako @@ -18,7 +18,7 @@ % endif

This tool attempts to detect copyright violations in articles. Simply give the title of the page you want to check and hit Submit. The tool will then search for its content elsewhere on the web and display a report if a similar webpage is found. If you also provide a URL, it will not query any search engines and instead display a report comparing the article to that particular webpage, like the Duplication Detector. Check out the FAQ for more information and technical details.

Note: The tool is still in beta. You are completely welcome to use it and provide feedback, but be aware that it may produce strange or broken results.

-
+ diff --git a/pages/settings.mako b/pages/settings.mako index b2a3dea..2ff25f5 100644 --- a/pages/settings.mako +++ b/pages/settings.mako @@ -9,7 +9,7 @@ % endif

Settings

This page contains some configurable options for the copyvio detector. Settings are saved as cookies. You can view and delete all cookies generated by this site at the bottom of this page.

- +
Site:
@@ -86,7 +86,7 @@ % endtry
Default site:${cookie.value | h} - + @@ -96,7 +96,7 @@ % endfor
- +