Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2f37f5bdbc41e014af07d086d1bd9c40c469ad18
Ticket: 838e99a76dd54f1961b8b5c4bdb3da114bf5b6f8
treat application/xml as text
User & Date: gahr on 2016-09-25 16:24:19
Changes

  1. icomment:
    My current conclusion is that the http package should default to utf-8 when dealing with XML content.
    
    Here's a new version of the patch.
    
    Index: library/http/http.tcl
    ==================================================================
    --- library/http/http.tcl
    +++ library/http/http.tcl
    @@ -1046,7 +1046,9 @@
                # We have to use binary translation to count bytes properly.
                fconfigure $sock -translation binary
     
    -           if {
    +           if {[regexp {application/(.*\+)?xml} $state(type)]} {
    +               set state(charset) utf-8
    +           } elseif {
                    $state(-binary) || ![string match -nocase text* $state(type)]
                } {
                    # Turn off conversions for non-text data
    
  2. login: "gahr"
  3. mimetype: "text/plain"
  4. username: "gahr"