Artifacts Associated With Ticket 3009322fffffffffffffffffffffffffffffffff
Ticket change [89910ba5fc] (rid 127250) by jda3000 on 2010-05-31 01:57:19:
- assignee initialized to: "patthoyts"
- cmimetype initialized to: "text/plain"
- comment initialized 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. - foundin initialized to: "obsolete: 8.6b1"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "jda3000"
- subsystem initialized to: "29. http Package"
- title initialized to:
Test for non-text data prevents transliteration of RSS chars
- type initialized to: "Bug"
Ticket change [e22763235e] (rid 87575) by coldstore on 2010-05-31 09:01:45:
- icomment:
The HTTP spec doesn't really countenance either test. IIRC, it should be possible to determine the encoding type of the request from TE, content-encoding or similar fields. One can't rely upon the content-type to determine the transport encoding.
- login: "coldstore"
- mimetype: "text/plain"
- username: "coldstore"
- icomment:
Ticket change [b63e2277d4] (rid 204015) by kjnash on 2022-09-09 15:42:13:
- closedate changed to: "2459832.15432576"
- closer changed to: "kjnash"
- 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. - icomment:
This bug was fixed in commit [07c269e62a] of 2016-10-08 which introduced the improved test command http::IsBinaryContentType.
- login: "kjnash"
- mimetype: "text/x-fossil-plain"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Closed"