Commit 3f7da044 authored by dmknght's avatar dmknght

Add some test

parent 5b647852
Pipeline #1137 failed
......@@ -4,5 +4,6 @@
# TODO handle end session
# TODO handle time
# TODO threadpool.setMaxPoolSize
# TODO skip `/` for extension like (a.exe)
when isMainModule:
echo("Hello, World!")
......@@ -15,4 +15,5 @@ proc checkBranch*(client: HttpClient, subPath, fullURL: string) =
except ProtocolError:
prntErr(fullURL, "ProtocolError")
except:
echo getCurrentExceptionMsg()
prntErr(fullURL, "Unknown")
......@@ -4,7 +4,7 @@ import threadpool
import httpclient
import strutils
setMaxPoolSize(32)
let allOptions = getOptions()
if not allOptions.paramError:
var client = newHttpClient()
......@@ -14,7 +14,8 @@ if not allOptions.paramError:
let fullURL = allOptions.url & line
# TODO handle / at end of line here
spawn checkBranch(client, line, fullURL)
if not line.endsWith("/"): # and option
if not line.endsWith("/") and not line.contains("."): # and option
# Some web servers support forward to `/` for branches.
spawn checkBranch(client, line & "/", fullURL & "/")
except:
discard
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment