~/bend-docscommunity

LAWS.bend open laws/TODOs

raw source on the hub · import element-http@0.1.0.0/LAWS.bend as LAWS

4 imports
import Base
import ./cookie.bend as Ck
import ./http.bend as Http
import ./websocket.bend as Ws

Laws

law http_status_line provedin PROOF.bendsource · line 9 · raw

{0x475c2a8333a479bccfdd668aaa51426c/http.status_of("HTTP/1.1 301 Moved Permanently") == 301 : U32}

K3.2 HTTP/1.1 on recorded responses: status line, chunked body.

law http_chunked_body provedin PROOF.bendsource · line 12 · raw

{0x475c2a8333a479bccfdd668aaa51426c/http.follow(1n, 0x475c2a8333a479bccfdd668aaa51426c/http.recorded, "http://h/a") == "Wikipedia" : String}

law http_redirect_followed provedin PROOF.bendsource · line 16 · raw

{0x475c2a8333a479bccfdd668aaa51426c/http.follow(5n, 0x475c2a8333a479bccfdd668aaa51426c/http.recorded, "http://h/") == "Wikipedia" : String}

a loop is a loud error once the redirect bound is spent.

law http_redirect_loop_fails provedin PROOF.bendsource · line 19 · raw

{0x475c2a8333a479bccfdd668aaa51426c/http.follow(5n, 0x475c2a8333a479bccfdd668aaa51426c/http.recorded, "http://h/loop") == "ERROR too many redirects" : String}

law websocket_masked_client_hello provedin PROOF.bendsource · line 52 · raw

{0x475c2a8333a479bccfdd668aaa51426c/websocket.first_payload([129, 133, 55, 250, 33, 61, 127, 159, 77, 81, 88]) == [72, 101, 108, 108, 111] : List<&2, U32>}

law websocket_server_text_frame provedin PROOF.bendsource · line 55 · raw

{0x475c2a8333a479bccfdd668aaa51426c/websocket.text_frame("Hello") == [129, 5, 72, 101, 108, 108, 111] : List<&2, U32>}

law websocket_partial_frame_waits provedin PROOF.bendsource · line 58 · raw

{0x475c2a8333a479bccfdd668aaa51426c/websocket.first_payload([129, 133, 55, 250]) == [] : List<&2, U32>}