Commit Diff


commit - 2d018e2bac6e99a837e24643e15a2ec348c49c68
commit + 671e26101c849a1f7c05165811e8f885f53aa7c5
blob - fa8ef1649eef82fed22a63eba3c7514fb00c8c8d
blob + 03cd0e36276951bda9bc56e0ef2dd8c4c3c1e3f3
--- lonk.py
+++ lonk.py
@@ -604,7 +604,6 @@ def proxy(mime, url):
 
 
 def vgi(cert_hash, lonk_url):
-    lonk_url = LonkUrl(raw_url)
     if lonk_url.page == "lonk":
         authenticated(cert_hash, lonk_url, page_lonk)
     elif lonk_url.page == "first":
@@ -655,11 +654,11 @@ def main():
     cert_hash_ = environ.get("VGI_CERT_HASH")
     if cert_hash_:
         input_url = input().strip()
-        lonk_url = LonkUrl(raw_url)
+        lonk_url = LonkUrl(input_url)
         try:
             start_time = clock_gettime(CLOCK_MONOTONIC)
             try:
-                vgi(cert_hash_, input_url)
+                vgi(cert_hash_, lonk_url)
             finally:
                 stderr.write(f"{cert_hash_}|{input_url}|{clock_gettime(CLOCK_MONOTONIC) - start_time:.3f}sec.\n")
         except HTTPError as error: