X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=yarrg%2Fyarrglib.tcl;h=a657537251ab29698fcb3e0f3e6fdfc5ce620c99;hp=e1bf6e8b0fbe866d1d7cbd86a0b87c9d84278d87;hb=ca7f7a582f148a9e7d5e182451b59c4b2b151389;hpb=c684b3ed0711098cdce5c2ad651f79d6631b0ba4 diff --git a/yarrg/yarrglib.tcl b/yarrg/yarrglib.tcl index e1bf6e8..a657537 100644 --- a/yarrg/yarrglib.tcl +++ b/yarrg/yarrglib.tcl @@ -6,3 +6,13 @@ proc manyset {list args} { set my $val } } + +proc httpclientsetup {program} { + ::http::config -urlencoding utf-8 + set ua [::http::config -useragent] + debug "USERAGENT OLD \"$ua\"" + set ua [exec ./database-info-fetch useragentstringmap $ua \ + $program 2>@ stderr] + ::http::config -useragent $ua + debug "USERAGENT NEW \"$ua\"" +}