about summary refs log tree commit diff stats
path: root/adapter/protocol/file.nim
diff options
context:
space:
mode:
Diffstat (limited to 'adapter/protocol/file.nim')
-rw-r--r--adapter/protocol/file.nim9
1 files changed, 1 insertions, 8 deletions
diff --git a/adapter/protocol/file.nim b/adapter/protocol/file.nim
index bd2c34a2..bf135180 100644
--- a/adapter/protocol/file.nim
+++ b/adapter/protocol/file.nim
@@ -4,7 +4,6 @@ import std/times
 
 import dirlist
 
-import loader/connecterror
 import utils/twtstr
 
 proc loadDir(path, opath: string) =
@@ -79,11 +78,6 @@ proc loadFile(f: File) =
       break
 
 proc main() =
-  if getEnv("MAPPED_URI_HOST") != "":
-    let code = int(ERROR_INVALID_URL)
-    stdout.write("Cha-Control: ConnectionError " & $code &
-      " cannot use host in file")
-    return
   let opath = getEnv("MAPPED_URI_PATH")
   let path = percentDecode(opath)
   var f: File
@@ -92,7 +86,6 @@ proc main() =
   elif dirExists(path):
     loadDir(path, opath)
   else:
-    let code = int(ERROR_FILE_NOT_FOUND)
-    stdout.write("Cha-Control: ConnectionError " & $code)
+    stdout.write("Cha-Control: ConnectionError FileNotFound")
 
 main()