aboutsummaryrefslogtreecommitdiff
path: root/Sources/gopherHandler.swift
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2023-12-09 15:57:59 -0700
committerNavan Chauhan <navanchauhan@gmail.com>2023-12-09 15:57:59 -0700
commit81f90e6340e84027bb62a15f8fa5048da9842b32 (patch)
tree449398c5e8f002e59673651c9515cc19b7dada30 /Sources/gopherHandler.swift
parent3d4d8ff25b4ef0b2c162528ece906fd463d170e4 (diff)
added version string to response
Diffstat (limited to 'Sources/gopherHandler.swift')
-rw-r--r--Sources/gopherHandler.swift5
1 files changed, 4 insertions, 1 deletions
diff --git a/Sources/gopherHandler.swift b/Sources/gopherHandler.swift
index ffe2ada..e43619d 100644
--- a/Sources/gopherHandler.swift
+++ b/Sources/gopherHandler.swift
@@ -229,6 +229,9 @@ final class GopherHandler: ChannelInboundHandler {
let search_line = "7Search Server\t/search\t\(gopherdata_host)\t\(gopherdata_port)\r\n"
gopherResponse.append(search_line)
}
+
+ // Append Server Info
+ gopherResponse.append(buildVersionStringResponse())
return gopherResponse.joined(separator: "")
@@ -286,7 +289,7 @@ final class GopherHandler: ChannelInboundHandler {
if gopherResponse.count == 0 {
gopherResponse.append("iNo results found for the query \(query)\r\n")
}
-
+ gopherResponse.append(buildVersionStringResponse())
return gopherResponse.joined(separator: "")
}