A minimalist and sane subset of HTTP that maps well to 9P(7) and encompasses the best RESTful practices.
Should be possible to implement a server using existing frameworks, eg., CGI. Writing new implementations from scratch should be trivial without depending on any external library.
Backwards compatibility:
C] <request> ::= <method> <request-headers> <opt-body> <response> ::= <result> <response-headers> <opt-body> <result> ::= <version> <status-message> <EOL> <method> ::= <verb> <resource> <version> <EOL> <version> ::= [dq]HTTP/0.2[dq] <status-message> ::= [dq]200 OK[dq] | [dq]204 No Content[dq] | [dq]303 See Other[dq] | [dq]304 Not Modified[dq] | [dq]400 Bad Request[dq] | [dq]401 Unauthorized[dq] | [dq]404 Not Found[dq] | [dq]420 Enhance Your Calm[dq] | [dq]500 Internal Server Error[dq] | [dq]503 Service Unavailable[dq] | [dq]505 HTTP Version Not Supported[dq] <verb> ::= [dq]GET[dq] | [dq]POST[dq] | [dq]DELETE[dq] | [dq]OPTIONS[dq] <request-headers> ::= <request-header> <EOL> | <request-header> <EOL> <request-headers> <response-headers> ::= <response-header> <EOL> | <response-header> <EOL> <response-headers> <request-header> ::= [dq]Accept: [dq] <content-type> | [dq]Authorization: [dq] <token> | [dq]Content-Length: [dq] <octet-count> | [dq]Content-Type: [dq] <content-type> | [dq]Date: [dq] <http-date> | [dq]Host: [dq] <host-name> | [dq]If-Modified-Since: [dq] <http-date> | [dq]Origin: [dq] <uri> | [dq]Range: bytes=[dq] <start> [dq]-[dq] <end> <response-header> ::= [dq]Access-Control-Allow-Origin: [dq] <uri-or-*> | [dq]Content-Length: [dq] <octet-count> | [dq]Content-Range: bytes [dq] <start> [dq]-[dq] <end> | [dq]Content-Type: [dq] <content-type> | [dq]Date: [dq] <http-date> | [dq]Expires: [dq] <http-date> | [dq]Location: [dq] <uri> | [dq]WWW-Authenticate: [dq] <authentication-scheme> <http-date> ::= <date> [dq] [dq] <time> [dq] [dq] <time-zone> <date> ::= <day-of-week> [dq], [dq] <day> [dq] [dq] <month> [dq] [dq] <year> <day-of-week> ::= [dq]Mon[dq] | [dq]Tue[dq] | [dq]Wed[dq] | [dq]Thu[dq] | [dq]Fri[dq] | [dq]Sat[dq] | [dq]Sun[dq] <day> ::= [dq]00[dq] | [dq]01[dq] | [dq]02[dq] | [dq]03[dq] | [dq]04[dq] | [dq]05[dq] | [dq]06[dq] | [dq]07[dq] | [dq]08[dq] | [dq]09[dq] | [dq]10[dq] | [dq]11[dq] | [dq]12[dq] | [dq]13[dq] | [dq]14[dq] | [dq]15[dq] | [dq]16[dq] | [dq]17[dq] | [dq]18[dq] | [dq]19[dq] | [dq]20[dq] | [dq]21[dq] | [dq]22[dq] | [dq]23[dq] | [dq]24[dq] | [dq]25[dq] | [dq]26[dq] | [dq]27[dq] | [dq]28[dq] | [dq]29[dq] | [dq]30[dq] | [dq]31[dq] <month> ::= [dq]Jan[dq] | [dq]Feb[dq] | [dq]Mar[dq] | [dq]Jun[dq] | [dq]Jul[dq] | [dq]Aug[dq] | [dq]Sep[dq] | [dq]Oct[dq] | [dq]Nov[dq] | [dq]Dec[dq] <year> ::= <digits> <time> ::= <hour> [dq]:[dq] <minute> [dq]:[dq] <second> <hour> ::= [dq]00[dq] | [dq]01[dq] | [dq]02[dq] | [dq]03[dq] | [dq]04[dq] | [dq]05[dq] | [dq]06[dq] | [dq]07[dq] | [dq]08[dq] | [dq]09[dq] | [dq]10[dq] | [dq]11[dq] | [dq]12[dq] | [dq]13[dq] | [dq]14[dq] | [dq]15[dq] | [dq]16[dq] | [dq]17[dq] | [dq]18[dq] | [dq]19[dq] | [dq]20[dq] | [dq]21[dq] | [dq]22[dq] | [dq]23[dq] <minute> ::= <sixty-ticks> <second> ::= <sixty-ticks> <sixty-ticks> ::= [dq]00[dq] | [dq]01[dq] | [dq]02[dq] | [dq]03[dq] | [dq]04[dq] | [dq]05[dq] | [dq]06[dq] | [dq]07[dq] | [dq]08[dq] | [dq]09[dq] | [dq]10[dq] | [dq]11[dq] | [dq]12[dq] | [dq]13[dq] | [dq]14[dq] | [dq]15[dq] | [dq]16[dq] | [dq]17[dq] | [dq]18[dq] | [dq]19[dq] | [dq]20[dq] | [dq]21[dq] | [dq]22[dq] | [dq]23[dq] | [dq]24[dq] | [dq]25[dq] | [dq]26[dq] | [dq]27[dq] | [dq]28[dq] | [dq]29[dq] | [dq]30[dq] | [dq]31[dq] | [dq]32[dq] | [dq]33[dq] | [dq]34[dq] | [dq]35[dq] | [dq]36[dq] | [dq]37[dq] | [dq]38[dq] | [dq]39[dq] | [dq]40[dq] | [dq]41[dq] | [dq]42[dq] | [dq]43[dq] | [dq]44[dq] | [dq]45[dq] | [dq]46[dq] | [dq]47[dq] | [dq]49[dq] | [dq]50[dq] | [dq]51[dq] | [dq]52[dq] | [dq]53[dq] | [dq]54[dq] | [dq]55[dq] | [dq]56[dq] | [dq]57[dq] | [dq]58[dq] | [dq]59[dq] <time-zone> ::= [dq]GMT[dq] <host-name> ::= <labels> <labels> ::= <label> | <label> [dq].[dq] <labels> <label> ::= <characters> <resource> ::= [dq]/[dq] <directory-list> <file-name> <directory-list> ::= <directory> | <directory> <directory-list> <file-name> ::= <characters> | <characters> [dq].[dq] <characters> <directory> ::= <file-name> [dq]/[dq] <uri> ::= [dq]http://[dq] <host-name> <resource> <uri-or-*> ::= <uri> | [dq]*[dq] <characters> ::= <character> | <character> <characters> <label> ::= <letter> | <digit> | <hyphen> <letter> ::= [dq]a[dq] | [dq]b[dq] | [dq]c[dq] | [dq]d[dq] | [dq]e[dq] | [dq]f[dq] | [dq]g[dq] | [dq]h[dq] | [dq]i[dq] | [dq]j[dq] | [dq]k[dq] | [dq]l[dq] | [dq]m[dq] | [dq]n[dq] | [dq]o[dq] | [dq]p[dq] | [dq]q[dq] | [dq]r[dq] | [dq]s[dq] | [dq]t[dq] | [dq]u[dq] | [dq]v[dq] | [dq]w[dq] | [dq]x[dq] | [dq]y[dq] | [dq]z[dq] <digit> ::= [dq]0[dq] | [dq]1[dq] | [dq]2[dq] | [dq]3[dq] | [dq]4[dq] | [dq]5[dq] | [dq]6[dq] | [dq]7[dq] | [dq]8[dq] | [dq]9[dq] <hyphen> ::= [dq]-[dq] <opt-body> ::= <body> | [dq][dq] R]
/man/6/http02(6) | Rev: Wed Feb 22 04:14:06 GMT 2023 |