2ab6f7caa2
git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1398 2a923420-c742-0410-a762-8d5b09965624
21 lines
371 B
Plaintext
Executable File
21 lines
371 B
Plaintext
Executable File
|
|
proc chunk {chk} {
|
|
puts -nonewline [format "%x\r\n" [string length $chk]]
|
|
puts -nonewline "$chk\r\n"
|
|
flush stdout
|
|
}
|
|
|
|
proc chunk_pad {{len 256}} {
|
|
incr len
|
|
chunk [string range [format "%${len}d" 0] 1 end-1]
|
|
}
|
|
|
|
proc start_chunked {{type "text/html"}} {
|
|
httpheader $type 0 "Transfer-Encoding: chunked\r\n"
|
|
}
|
|
|
|
proc end_chunked {} {
|
|
puts -nonewline "0\r\n\r\n\r\n"
|
|
}
|
|
|