mirror of https://codeberg.org/cage/tinmop/
- simulated a server that send data slowly (but not slow enough to trigger a timeout).
This commit is contained in:
parent
3f0cdae6d6
commit
9e3a93885f
|
@ -59,6 +59,22 @@ and key stored in the file pointed by the filesystem path
|
|||
request
|
||||
client-cert-fingerprint)
|
||||
(cond
|
||||
((cl-ppcre:scan "slow" request)
|
||||
(format t "slow...~%")
|
||||
(let ((response (format nil
|
||||
"~a text/gemini~a~a"
|
||||
(code gemini-client::+20+)
|
||||
#\return #\newline)))
|
||||
(format t "sending: ~a~%" response)
|
||||
(write-sequence (text-utils:string->octets response)
|
||||
stream)
|
||||
(loop for i from 0 below 10000 do
|
||||
(sleep 1)
|
||||
(write-sequence (text-utils:string->octets (format nil "~a~%" i))
|
||||
stream)
|
||||
(finish-output stream))
|
||||
(close stream)
|
||||
(get-data)))
|
||||
((cl-ppcre:scan "timeout" request)
|
||||
(format t "timeout...~%")
|
||||
(sleep 3600))
|
||||
|
|
Loading…
Reference in New Issue