summaryrefslogtreecommitdiffstats
path: root/ds9/library/htp.tcl
blob: 42fd919cae743e3f55b151d585780d97225729fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Needed because some sites return 'x-fits' (CADC) in Content-Encoding
proc http::ContentEncoding {token} {
    upvar 0 $token state
    set r {}
    if {[info exists state(coding)]} {
	foreach coding [split $state(coding) ,] {
	    switch -exact -- $coding {
		deflate { lappend r inflate }
		gzip - x-gzip { lappend r gunzip }
		compress - x-compress { lappend r decompress }
		identity {}
		x-fits {}
		default {
# just do nothing
# return -code error "unsupported content-encoding \"$coding\""
		}
	    }
	}
    }
    return $r
}