summaryrefslogtreecommitdiffstats
path: root/ds9/library/htp.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'ds9/library/htp.tcl')
-rw-r--r--ds9/library/htp.tcl22
1 files changed, 22 insertions, 0 deletions
diff --git a/ds9/library/htp.tcl b/ds9/library/htp.tcl
new file mode 100644
index 0000000..42fd919
--- /dev/null
+++ b/ds9/library/htp.tcl
@@ -0,0 +1,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
+}
+