ns_parsemessage - Parse an HTTP message
This function parses a full HTTP message (first line, headers, and body) into a Tcl dictionary and parses the header fields into a new case-insensitive ns_set. The implementation cares about folded (multi-line) header fields.
The result of this command is a Tcl dictionary containing the following elements.
firstline
headers
body
% ns_parsemessage HTTP/1.1 200 OK content-length: 2 OK firstline {HTTP/1.1 200 OK} headers d0 body OK % ns_set format d0 headers: content-length: 2