ns_parseheader - Parse HTTP header
This function parses a single HTTP header line into a predefined ns_set specified by set.
The headerline specifies a line containing HTTP header fields, where the field name is parased into a key of the ns_set and the field value to the value of the entry.
The option -prefix can be used to specify a prefix for the key.
Optional argument disposition can be one of the following
toupper - convert header names to uppercase
tolower - convert header names to lowercase
preserve - preserve the existing case
When no disposition is provided, it defaults to tolower
set reply [ns_set create reply] ns_parseheader $reply "Connection: Upgrade" # # Return the content of the ns_set in form of a dict # ns_set array $reply % connection Upgrade