emerging-ezhttp
Search uses release 0.22.0.0 · 909 definitions
Definitions (909)
- def server.read.addoctets added to the pieces: is the request now whole?
- def server.read.textoctets that arrived, or none once the peer has closed
- def server.read.gota receive's answer: a failure loses the connection, no octets is the peer closing, octets go onto the pieces
- def server.read.goreceive until the head has ended and its Content-Length has arrived, the peer closes, or the receives run out
- def server.readreceive then parse an HTTP request (RFC 9112 §3)
- def server.sent.unafter a send: the socket, or the line of a lost connection
- def server.sendsend octets
- def server.send.textsend text as its UTF-8 octets
- def server.closeafter the last send: close, logging first when it failed
- def server.thenafter a send in the middle: go on, or lose the connection
- def server.answera text reply shaped for the request's method (HTTP-SRV-3), then close
- def server.octets.goan octets reply once its length is known: its head, then its octets unless it is bare (HTTP-SRV-6, 8)
- def server.chunksthe most chunks one streamed reply writes
- def server.chunk.putone chunk the channel gave: framed and sent, or skipped when empty
- def server.chunk.sizeda chunk with its length known
- def server.chunk.gotwhat the channel gave: a chunk, or its close, which ends the body
- def server.stream.goevery chunk the channel gives, until it is closed
- def server.stream.bodya streamed reply after its head: its chunks, or nothing when it is bare
- def server.replya handler's answer, shaped for the request's method (HTTP-SRV-3, 6 to 8)
- def server.reqthe handler's request: the request as text and its body's octets
- def server.stepanswer now, or call the handler: step.bend decides which (HTTP-SRV-1, 2, 9)
- def server.conn.gotafter the read: a lost connection, or a request to step
- def server.connone connection: read, decide, maybe handle, write, close
- def server.slot.givegive a slot back
- def server.slot.taketake a slot, waiting while every one is taken
- def server.donesay a fork is done, when the serve waits for its forks
- def server.fork.bodya connection's fork: serve it, give its slot back, and say it is done
- def server.forkserve an accepted connection on its own fork, a slot taken first
- def server.joinwait for n forks to say they are done
- def server.loop.gotwhat an accept brought, for the loop: `took` serves a connection and goes on with one connection fewer, `idle` accepts again, `missed` logs, pauses and goes on with one fewer (a failed accept counts toward the limit)
- def server.loop.gothe limited accept loop: `fuel` connections left, `idles` idle accepts in a row left, `forks` forked so far
- def server.slotsthe slots a concurrency limit allows (max 0: no limit)
- def server.serve_io_withlisten and serve up to `limit` connections, each on its own fork, at most `max` at once (0: no limit), with a context value for the handler; returns once every fork is done (SPEC.md HTTP-TRUST-2)
- def server.lift.witha pure handler as an IO one
- def server.serve_withlisten and serve with a pure handler and a context value
- def server.forever.gothe accept loop with no limit: it runs until the process is stopped
- def server.serve_forever_withlisten and serve with an IO handler and a context value until the process is stopped, at most `max` connections at once (0: no limit)
- def server.plaina `_with` request as the text request a plain handler takes
- def server.texta text reply as an answer
- def server.wrap.ioa plain IO handler as a `_with` one
- def server.serve_iolisten and serve up to `limit` connections with an IO handler
- def server.lifta pure handler as an IO one
- def server.servelisten and serve up to `limit` connections
- def server.onceserve exactly one connection then stop
- def server.serve_foreverlisten and serve with an IO handler until the process is stopped
- def server.dispatchturn a bad request into 400; otherwise call the handler
- def server.reply.builtapply HEAD body stripping once the method token is known
- def server.reply.textHEAD responses are written with an empty body (RFC 9110 §9.3.2)
- def server.cors_replyCORS preflight or simple headers, after HEAD bodies are dropped
- type Stepwhat a request asks of the server: answer it now, or call the handler
- type Gotan effect's outcome on one connection: the value, or the line to log for a connection that is lost
- def step.texta request received as octets, as text: its method, target, header names and values and body each decoded as UTF-8 (SPEC.md HTTP-SRV-2); a bad one keeps its reason
- def step.ofa bad request is answered 400 with its reason and never reaches the handler; a good one goes to the handler as it was parsed
- def step.linethe line logged for a failed effect: `ezhttp: <phase>: <why>`
- def step.gota failed accept or recv loses the connection instead of ending the server
- def step.senta failed send loses the connection too; the bytes it did not send are dropped
- def step.barewhether a reply is written with its head only: a reply to HEAD, or a 204 or 304 (RFC 9110 §9.3.2, §15.3.5, §15.4.5)
- def step.octetsthe body octets of a request, as they arrived; none for a bad one
- type Acceptwhat an accept with a deadline brought: a connection, nothing before the deadline, or a lost accept with its line (SPEC.md HTTP-SRV-4)
- def step.misseda failed accept once it is known whether its deadline passed
- def step.acceptedan accept's outcome: ETIMEDOUT (110) is a deadline that passed
- def step.clena Content-Length that reads, or none
- def step.need.ofoctets a request needs in all once its head has ended: the head, its blank line and the octets its Content-Length names (0 when it names none)
- def step.needoctets a request needs in all, none while its head has not ended
- type Scanwhere the scan stands: in text, after `&`, after `&#`, after `&#x` (the `x` or `X` kept), inside a number (hexadecimal or not, its value so far), or inside a name (its text so far and how many characters it has)
- def fffdU+FFFD REPLACEMENT CHARACTER, alone
- def capthe value a number is held at once it is past U+10FFFF: any larger one reads the same (U+FFFD)
- def digit.ofa digit's value in a base (16 or 10), or 16 when it is not one
- def digita character's value as a digit in a base, or 16 when it is not one
- def growa number with one more digit, held at cap() once past it
- def w1252what 0x80 to 0x9F stand for (HTML §13.2.5.80's table: Windows-1252, the five it leaves undefined as themselves)
- def nththe code point at a place in a list, 65533 past its end
- def droppeda code point Python drops: C0 controls but TAB, LF, FF and CR, DEL and the C1 controls, and the noncharacters U+FDD0 to U+FDEF and U+xFFFE, U+xFFFF
- def code.kepta code point in range: nothing when Python drops it, else the character
- def code.rangea surrogate or a number past U+10FFFF is U+FFFD
- def code.c10x80 to 0x9F as the table says
- def code.cr0x0D is a carriage return
- def code.zero0 is U+FFFD, else on to 0x0D
- def codewhat a numeric reference stands for: 0 is U+FFFD
- def best.lena name's length, or 0 for none yet
- def best.takethe better of the best so far and a name the text starts with: the longer
- def best.hita name the text starts with or not
- def best.stepone table row against the best so far
- def bestthe longest name in the rows that the text starts with
- def charsthe one or two characters a row stands for
- def named.ofa reference's text once its longest name is known: the characters, then the text after the name as written; with no name, `&` and the text
- def nameda named reference's text (after the `&`, with its `;` if it has one)
- def name.chara character that may be in a name: anything but TAB, LF, FF, space, `<`, `&`, `#` and `;`
- def text.ofa character in text once it is known whether it is `&`
- def texta character in text: `&` may open a reference
- def amp.nameafter `&`: a name character opens a name, else the `&` is text
- def ampafter `&`: `#` opens a number
- def hash.xafter `&#`: `x` or `X` opens a hexadecimal number
- def hash.decafter `&#`, once it is known whether the character is a decimal digit
- def hashafter `&#`: a decimal digit opens a decimal number
- def hash.hex.ofafter `&#x`, once it is known whether the character is a hex digit
- def hash.hexafter `&#x`: a hex digit opens the number, else `&#x` is text
- def num.endinside a number, a character that is not a digit: `;` ends the reference with it, anything else ends it and is text
- def numinside a number: a digit grows it
- def name.endinside a name, a character that does not join it: the name ends there