PicoLisp implementation of the BOAWP specification https://boawp.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

119 lines
3.0 KiB

### Protocols
### COMMANDS
(setq *BOAWP_default_commands
# BOAWP
'((10 . "NOOP") # \n
(33 . "ERROR") # !
(43 . "OK") # +
) )
(setq *BOAWP_http_commands
# HTTP
(mapcar '((N S)
(cons N S) )
(range 97 105)
'("GET" "HEAD" "POST" "PUT" "DELETE" "CONNECT" "OPTIONS" "TRACE" "PATCH") ) )
(setq *BOAWP_stomp_commands
# STOMP
(mapcar '((N S)
(cons N S) )
(range 97 115)
'("CONNECT" "STOMP" "CONNECTED" "SEND" "SUBSCRIBE" "UNSUBSCRIBE" "ACK" "NACK"
"BEGIN" "COMMIT" "ABORT" "DISCONNECT" "MESSAGE" "RECEIPT" "ERROR" "AUTH" "PING" "CHALLENGE" "PONG") ) )
(setq *BOAWP_gemini_commands
# GEMINI
(list (cons 97 "GET")) )
### HEADER NAMES
(setq *BOAWP_default_header_names
# BOAWP
'((32 . "noop")
(65 . "protocol")
(66 . "max-headers")
(67 . "max-body")
(68 . "max-value")
(69 . "max-int")
(70 . "null")
(71 . "true")
(72 . "false")
(73 . "accept-version")
(74 . "content-type")
(75 . "content-encoding")
(76 . "date")
(77 . "host")
(78 . "keepalive")
(79 . "server")
(80 . "timestamp")
(81 . "user-agent")
) )
(setq *BOAWP_http_header_names
# HTTP
'((82 . "accept-charset")
(83 . "accept-encoding")
(84 . "accept-language")
(85 . "accept-ranges")
(86 . "accept")
(87 . "access-control-allow-origin")
(88 . "age")
(89 . "allow")
(90 . "authorization")
(48 . "cache-control")
(49 . "content-disposition")
(50 . "content-language")
(51 . "content-length")
(52 . "content-location")
(53 . "content-range")
(54 . "cookie")
(55 . "etag")
(56 . "expect")
(57 . "expires")
(97 . "from")
(98 . "if-match")
(99 . "if-modified-since")
(100 . "if-none-match")
(101 . "if-range")
(102 . "if-unmodified-since")
(103 . "last-modified")
(104 . "link")
(105 . "location")
(106 . "max-forwards")
(107 . "proxy-authenticate")
(108 . "proxy-authorization")
(109 . "range")
(110 . "referer")
(111 . "refresh")
(112 . "retry-after")
(113 . "set-cookie")
(114 . "strict-transport-security")
(115 . "transfer-encoding")
(116 . "vary")
(117 . "via")
(118 . "www-authenticate")
) )
(setq *BOAWP_stomp_header_names
# STOMP
(append
(mapcar '((N S)
(cons N S) )
(range 82 90)
'("ack" "destination" "heart-beat" "id" "login" "message" "message-id" "passcode"
"receipt"))
(mapcar '((N S)
(cons N S) )
(range 48 52)
'("receipt-id" "session" "subscription" "transaction" "version") ) ) )
(setq *BOAWP_gemini_header_names
# GEMINI
(mapcar '((N S)
(cons N S) )
(range 82 86)
'("fragment" "lang" "path" "query" "status") ) )
(setq *BOAWP_commands (append *BOAWP_default_commands *BOAWP_http_commands))
(setq *BOAWP_header_names (append *BOAWP_default_header_names *BOAWP_http_header_names))