Pudu programming language
Menu
API reference

Std.Http.Safe.framing

1 declaration

fn

framing: &Array[(Str, Str)] -> Result[(Int, Bool), Std.Http.Safe.Unsafe]

This is a callable function.

What it does

How long a body a message says is coming.

A message that says it two ways is refused rather than resolved. There is

no precedence rule here because a rule only helps when everything in the

chain shares it, and a message framed two ways exists precisely because

they do not.

A transfer encoding is admitted only when chunked is its final coding,

read across every Transfer-Encoding header in order. Any other final

coding leaves the body's end unstated: a reader that took it as empty

would read the body's bytes as the next message, which is how one request

is smuggled inside another.

How long a body a message says is coming, and whether it is chunked.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.
  • Names inside [ ] are type arguments, such as the item type held by a collection.
  • Result makes success and recoverable failure part of the function's type.

Back to Std.Http.SafeSearch related declarations