Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: b63e2277d47a0c7f499ef739f12bec77db7bc4da650e7ac4eaa35292879290f8
Ticket: 3009322fffffffffffffffffffffffffffffffff
Test for non-text data prevents transliteration of RSS chars
User & Date: kjnash on 2022-09-09 15:42:13
Changes

  1. closedate changed to: "2459832.15432576"
  2. closer changed to: "kjnash"
  3. comment changed to:
    The test for text vs binary content that takes place in http:Event near the comment "# Turn off conversions for non-text data" only checks for content types that start with "text"  like "text/xml" or "text/html" many sites use "application/rss+xml" or the like to describe the content of the response if it is an rss feed.
    
    Perhaps the test should allow for this.
    
    Here is the test as written:
    
                if {
                    $state(-binary) || ![string match -nocase text* $state(type)]
                } then {
                    # Turn off conversions for non-text data
                    set state(binary) 1
                }
    
    Here is a work-around that satisfied me:
    
    if {![string match -nocase application/rss* $state(type)] &&  ![string match -nocase application/xml* $state(type)] } {set state(binary) 1}
    
    That is, I added a test for rss and xml  before setting the state(binary) flag to 1.
    
  4. icomment:
    This bug was fixed in commit [07c269e62a] of 2016-10-08 which introduced the improved test command http::IsBinaryContentType.
    
  5. login: "kjnash"
  6. mimetype: "text/x-fossil-plain"
  7. resolution changed to: "Fixed"
  8. severity changed to: "Minor"
  9. status changed to: "Closed"