bend-kit-multipart
Releases (6)
-
0.3.0.0 indexed
-
0.2.0.1 unindexed
-
0.2.0.0 invalid
expected a fresh constructor name (duplicate declaration: Text)
-
0.1.1.1 invalid
expected a fresh constructor name (duplicate declaration: Text)
-
0.1.1.0 invalid
expected a fresh constructor name (duplicate declaration: Text)
-
0.1.0.0 invalid
expected a fresh constructor name (duplicate declaration: Text)
Definitions (99)
multipart.bend
- type PartOne form field.
- type ItemWhat the streaming decoder reports, in order: Head, then zero or more Body pieces, then Tail, per part.
- def split1.consThe text before the first c, and the text after it.
- def split1
- type ClsHeader parameters (RFC 2045 §5.1, RFC 7578 §4.2): key=token or key="quoted", split on ';'.
- type Pm
- type Param
- type PSmode, the key and value so far (reversed), and the parameters found (latest first).
- def cls
- def params.emit
- def params.step
- def params.end
- def params.go
- def paramsThe parameters of a header value's text after its first ';', in order.
- def lookupThe first parameter named k (lowercase).
- def esc.oneWHATWG form-data escapes for names and filenames.
- def esc
- def unesc.fixacc is reversed, so "%22" shows as "22%".
- def unesc.go
- def unescUndoes esc, as the Fetch spec's form-data parser does.
- def unesc.m
- def bcharRFC 2046 §5.1.1 bchars: DIGIT ALPHA ' ( ) + _ , - .
- def bchars
- def boundary.ok1 to 70 bchars, not ending in a space.
- def boundary.words
- def boundary.new"bend-kit-" and 128 bits from the OS secure random source, as hex: 41 bchars.
- def content_typeThe Content-Type header value for a body encoded with boundary b.
- def boundary.get.of
- def boundary.getThe boundary parameter of a Content-Type value, such as a request's, or None.
- def enc.fname
- def enc.ctype
- def enc.head
- def enc.ctype.okA Content-Type with CR or LF would inject header lines.
- def enc.found
- def enc.body
- def enc.partThe pieces so far, latest first.
- def enc.fin
- def enc.go
- def encode.if
- def encodeThe body for parts under boundary b (RFC 7578 §4.1).
- def form.enc
- def form.of
- def formThe Content-Type value and body for parts, under a fresh random boundary.
- type StagePre: before the first delimiter.
- type Step
- type Decdelim is CRLF "--" boundary and dlen its length; buf holds the bytes not yet decided.
- def MAX_HEADponytail: a fixed cap on a header block or boundary line; make it a decoder field if a caller needs another.
- def drop
- def keep.two
- def keep.of
- def keepb as (all but its last k bytes, its last k bytes).
- def emit
- def wait.if
- def wait.bigWait for more input, unless the undecided bytes already pass MAX_HEAD.
- def suffix.dashWhat follows a delimiter match (RFC 2046 §5.1.1): "--", or transport padding then CRLF, makes it a delimiter (0).
- def suffix.lf
- def suffix
- def suffix.winponytail: looks at 64 bytes past the match; padding longer than that counts as data.
- def suffix.of
- def suffix.atThe buffer and the kind of the match at i.
- def pre.ifPre: the preamble is dropped.
- def pre.kind
- def pre.hit
- def after.lineAfter: suffix already saw "--" or padding then CRLF, so both are in buf.
- def after.dash
- def meta.lineHeader block to a Head (RFC 7578 §4.2, §4.4).
- def meta.go
- def head.named
- def head.form
- def head.disp
- def head.meta
- def head.parseLines split on LF; trimming drops each CR.
- def heads.item
- def heads.cut
- def heads.foundbuf starts with the CRLF that ended the boundary line, so a match at 0 is an empty block.
- def text.flush.lenContent: bytes that cannot begin a delimiter go out as Body; the last dlen - 1 wait for the next chunk.
- def text.flush
- def text.cut
- def text.dataA match that is data goes out through its first byte, and the search goes on after it.
- def text.holdA match whose suffix has not arrived: the bytes before it go out, and it waits.
- def text.if
- def text.kind
- def text.hit
- def step
- def go.stop
- def goEach More step consumes a byte, except the two after a delimiter, which itself consumes dlen >= 5, so len + 8 steps suffice.
- def decoderA decoder for boundary b.
- def feed.go
- def feedThe next chunk of a body, in any split.
- def finishDone once the close delimiter has been read; the epilogue is ignored.
- def collect.add
- def collectItems folded into parts, latest first.
- def chunks.fed
- def chunks.step
- def chunks.fin
- def chunks.end
- def chunks.go
- def decode.chunksThe parts of a body that arrives as chunks, split anywhere.
- def decodeThe parts of a whole body.