INNER CODE UNIT · Python

trailer

ministackorg/ministack · ministack/app.py:572

            trailer = body[crlf + 2 :]
            break
        data_start = crlf + 2
        chunks.append(body[data_start : data_start + chunk_size])
        pos = data_start + chunk_size + 2  # skip trailing \r\n
    decoded = b"".join(chunks)

    # A checksum computed while the body streamed arrives here rather than
    # among the request headers, and the rest of the request has no way to
    # tell the two apart -- so lift it into the headers, where every
    # checksum reader already looks.  An explicit header wins: the trailer
    # is the late copy of the same field, not an override.
    for line in trailer.split(b"\r\n"):
        name, sep, value = line.partition(b":")
        if not sep:
            continue
        name = name.decode("ascii", errors="replace").strip().lower()
        if name:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…