Artifacts Associated With Ticket 219399ffffffffff
Ticket change [3c2dee93b1] (rid 120879) by nobody on 2000-10-26 05:12:26:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 6255 Bug Version: 8.3 SubmitDate: '2000-09-12' LastModified: '2000-10-25' Severity: CRIT Status: UnAssn Submitter: techsupp OS: Solaris OSVersion: Solaris 8 Machine: Ultra 1 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: George Orwell Extensions: none CustomShell: none Comments: I'm using a fairly recent release: tclsh % package require http 2.2 Incoming gzip is totally failing because <CR>s are turning into <NL>s. ReproducibleScript: package require http set headers [list Accept "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*" \ Accept-Encoding gzip \ Accept-Language en \ Accept-Charset "iso-8859-1,*,utf-8" ] set token [http::geturl http://www.netaddress.com/ -headers $headers] upvar #0 $token state set fd [open temp.body.gz w] fconfigure $fd -translation binary puts -nonewline $fd $state(body) close $fd ObservedBehavior: Incoming HTTP says text/html encoded gzip. # HTTP: HTTP/1.1 200 OK # HTTP: Date: Mon, 11 Sep 2000 16:07:40 GMT # HTTP: Server: Apache/1.2.5 # HTTP: Content-Length: 2518 # HTTP: Content-encoding: gzip # HTTP: Keep-Alive: timeout=1, max=99 # HTTP: Connection: Keep-Alive # HTTP: Content-Type: text/html In the http package (package require http), there appears to be an error: if {![regexp -nocase ^text $state(type)]} { # Turn off conversions for non-text data fconfigure $s -translation binary This is not being triggered, because $state(type) is 'text/html'. DesiredBehavior: It is not picking up on the text/html being encoded: $state(meta) ...Content-encoding gzip... Patch: This crude edit means I can now gunzip the data without failing due to a CRC error: if {![regexp -nocase ^text $state(type)] \ || [regexp -nocase gzip $state(meta)]} { PatchFiles: package require http - foundin initialized to: "obsolete: 8.3"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to:
Incoming text encoded gzip not being read in binary mode
- type initialized to: "Bug"
Ticket change [da3a4be8a5] (rid 107739) by dkf on 2001-01-25 17:06:46:
- subsystem changed to: "62. (unused)"
Ticket change [ca55f29caf] (rid 95326) by dkf on 2001-02-05 03:56:12:
- subsystem changed to: "29. http Package"
Ticket change [3f9fe488e5] (rid 121495) by hobbs on 2001-08-21 06:56:27:
- assignee changed to: "hobbs"
Ticket change [2e5b5052d1] (rid 119207) by hobbs on 2001-09-07 06:47:35:
- closedate changed to: "2001-09-06T23:47:35"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 fixed in core-8-3-1-branch and 8.4a4cvs so that encoding is detected, and a just-in-case (CYA) -binary flag was added.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Deleted"
- username: "hobbs"