Browse Source

Use gemini commands and headers in PoC code

master
Alex Williams 10 months ago
parent
commit
0a9478a27d
Signed by: aw GPG Key ID: 19EE4AAA361A7E2C
2 changed files with 7 additions and 1 deletions
  1. +3
    -0
      client.l
  2. +4
    -1
      server.l

+ 3
- 0
client.l View File

@ -15,6 +15,9 @@
(chdir ".modules/picolisp-boawp/HEAD"
(load "libboawp.l") )
(setq *BOAWP_commands (append *BOAWP_default_commands *BOAWP_gemini_commands))
(setq *BOAWP_header_names (append *BOAWP_default_header_names *BOAWP_gemini_header_names))
(de poc-boawp-connect ()
(let Fd (connect *Host *Port)
(if Fd


+ 4
- 1
server.l View File

@ -20,6 +20,9 @@
(chdir ".modules/picolisp-boawp/HEAD"
(load "libboawp.l") )
(setq *BOAWP_commands (append *BOAWP_default_commands *BOAWP_gemini_commands))
(setq *BOAWP_header_names (append *BOAWP_default_header_names *BOAWP_gemini_header_names))
(de poc-boawp-listen ()
(prinl "[parent]=" *Pid " started")
@ -105,7 +108,7 @@
(list
(list (char "B") (char "0") (char "A") (char "^J")) # "B0A\n"
(list 0 "ERROR")
(list (cons "protocol" *BOAWP_DEFAULT_PROTOCOL) (cons "status" Code) (cons "content-type" *BOAWP_DEFAULT_FORMAT))
(list (cons "protocol" *BOAWP_DEFAULT_PROTOCOL) (cons "status" Code))
Msg )
Encoded (boawp-encode Response) )


Loading…
Cancel
Save