diff options
Diffstat (limited to 'adapter/protocol')
| -rw-r--r-- | adapter/protocol/file.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/adapter/protocol/file.nim b/adapter/protocol/file.nim index d05d558c..fbd14479 100644 --- a/adapter/protocol/file.nim +++ b/adapter/protocol/file.nim @@ -96,6 +96,11 @@ proc loadFile(istream: Stream) = 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) let istream = newFileStream(path, fmRead) |