Another revision of http.prs
This commit is contained in:
parent
ef1ebe6412
commit
70f42dd931
|
@ -6,7 +6,7 @@ ByteString
|
||||||
QueryValue„„„„´³named³body´³refµ„³RequestBody„„„„„³HttpService´³rec´³lit³http-service„´³tupleµ´³named³host´³refµ„³HostPattern„„´³named³port´³atom³
SignedInteger„„´³named³method´³refµ„³
MethodPattern„„´³named³path´³refµ„³PathPattern„„„„„³PathPattern´³seqof´³refµ„³PathPatternElement„„³RequestBody´³orµµ±present´³atom³
|
QueryValue„„„„´³named³body´³refµ„³RequestBody„„„„„³HttpService´³rec´³lit³http-service„´³tupleµ´³named³host´³refµ„³HostPattern„„´³named³port´³atom³
SignedInteger„„´³named³method´³refµ„³
MethodPattern„„´³named³path´³refµ„³PathPattern„„„„„³PathPattern´³seqof´³refµ„³PathPatternElement„„³RequestBody´³orµµ±present´³atom³
|
||||||
ByteString„„µ±absent´³lit€„„„„³HttpListener´³rec´³lit³
http-listener„´³tupleµ´³named³port´³atom³
SignedInteger„„„„„³HttpResponse´³orµµ±
|
ByteString„„µ±absent´³lit€„„„„³HttpListener´³rec´³lit³
http-listener„´³tupleµ´³named³port´³atom³
SignedInteger„„„„„³HttpResponse´³orµµ±
|
||||||
processing´³rec´³lit³
|
processing´³rec´³lit³
|
||||||
processing„´³tupleµ„„„„µ±status´³rec´³lit³status„´³tupleµ´³named³code´³atom³
SignedInteger„„´³named³message´³atom³String„„„„„„µ±header´³rec´³lit³header„´³tupleµ´³named³name´³atom³Symbol„„´³named³value´³atom³String„„„„„„µ±body´³rec´³lit³body„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„µ±done´³rec´³lit³done„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„„„³
MethodPattern´³orµµ±any´³lit€„„µ±specific´³atom³Symbol„„„„³PathPatternElement´³orµµ±label´³atom³String„„µ±wildcard´³lit³_„„µ±rest´³lit³...„„„„„³embeddedType€„„µ³noise„´³schema·³version°³definitions·³Packet´³orµµ±complete´³atom³
|
processing„´³tupleµ„„„„µ±status´³rec´³lit³status„´³tupleµ´³named³code´³atom³
SignedInteger„„´³named³message´³atom³String„„„„„„µ±header´³rec´³lit³header„´³tupleµ´³named³name´³atom³Symbol„„´³named³value´³atom³String„„„„„„µ±chunk´³rec´³lit³chunk„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„µ±done´³rec´³lit³done„´³tupleµ´³named³chunk´³refµ„³Chunk„„„„„„„„³
MethodPattern´³orµµ±any´³lit€„„µ±specific´³atom³Symbol„„„„³PathPatternElement´³orµµ±label´³atom³String„„µ±wildcard´³lit³_„„µ±rest´³lit³...„„„„„³embeddedType€„„µ³noise„´³schema·³version°³definitions·³Packet´³orµµ±complete´³atom³
|
||||||
ByteString„„µ±
|
ByteString„„µ±
|
||||||
fragmented´³seqof´³atom³
|
fragmented´³seqof´³atom³
|
||||||
ByteString„„„„„³ Initiator´³rec´³lit³ initiator„´³tupleµ´³named³initiatorSession´³embedded´³refµ„³Packet„„„„„„³ NoiseSpec´³andµ´³dict·³key´³named³key´³atom³
|
ByteString„„„„„³ Initiator´³rec´³lit³ initiator„´³tupleµ´³named³initiatorSession´³embedded´³refµ„³Packet„„„„„„³ NoiseSpec´³andµ´³dict·³key´³named³key´³atom³
|
||||||
|
|
|
@ -36,17 +36,29 @@ RequestBody = @present bytes / @absent #f .
|
||||||
# Assertion to handler entity
|
# Assertion to handler entity
|
||||||
HttpContext = <request @req HttpRequest @res #:HttpResponse> .
|
HttpContext = <request @req HttpRequest @res #:HttpResponse> .
|
||||||
|
|
||||||
|
# HttpResponse protocol. Delivered to the `res` ref in `HttpContext`.
|
||||||
|
#
|
||||||
|
# Use of `processing` is optional, so the flow is either:
|
||||||
|
#
|
||||||
|
# +processing . (status | header)* . chunk* . done? . -processing
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# (status | header)* . chunk* . done
|
||||||
|
#
|
||||||
|
# Done triggers completion of the response and retraction of the frame by the peer, whether
|
||||||
|
# `processing` is used or not. In addition, if `processing` is used, its retraction triggers
|
||||||
|
# completion and termination. If `processing` is retracted before `status` is delivered, the
|
||||||
|
# response is considered a 500.
|
||||||
|
#
|
||||||
@<TODO "trailers?">
|
@<TODO "trailers?">
|
||||||
# Messages
|
|
||||||
HttpResponse =
|
HttpResponse =
|
||||||
# Assertion - frames the response. When retracted, response is considered complete.
|
# Assertion - frames the response.
|
||||||
# If retracted before `status` is delivered, response is considered a 500.
|
|
||||||
/ <processing>
|
/ <processing>
|
||||||
# Remainder are messages: +processing . (status | header)* . body* . done? . -processing
|
# Remainder are messages.
|
||||||
# Done triggers completion of the response and retraction of the frame by the peer.
|
|
||||||
/ <status @code int @message string>
|
/ <status @code int @message string>
|
||||||
/ <header @name symbol @value string>
|
/ <header @name symbol @value string>
|
||||||
/ <body @chunk Chunk>
|
/ <chunk @chunk Chunk>
|
||||||
/ <done @chunk Chunk>
|
/ <done @chunk Chunk>
|
||||||
.
|
.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue