# HG changeset patch # User Matti Hamalainen # Date 1417425110 -7200 # Node ID cb86368b8fcd3eea906d65cd79a94a462a43787e # Parent aaf433ab696a97e0df2c86c39a027ba7646a5363 urllog: Change handling of HTTP requests. diff -r aaf433ab696a -r cb86368b8fcd urllog.tcl --- a/urllog.tcl Thu Oct 30 15:48:43 2014 +0200 +++ b/urllog.tcl Mon Dec 01 11:11:50 2014 +0200 @@ -374,18 +374,6 @@ #------------------------------------------------------------------------- -proc urllog_http_handler {utoken utotal ucurr} { - upvar #0 $utoken state - - # Stop fetching data after 3000 bytes, this should be enough to - # contain the head section of a HTML page. - if {$ucurr > 64000} { - set state(status) "ok" - } -} - - -#------------------------------------------------------------------------- proc urllog_checkurl {urlStr urlNick urlHost urlChan} { global urllog_tlds urllog_check urlmsg_nosuchhost urlmsg_ioerror global urlmsg_timeout urlmsg_errorgettingdoc urllog_httprep @@ -488,7 +476,7 @@ } ### Does the document pointed by the URL exist? - if {[catch {set utoken [::http::geturl $urlStr -progress urllog_http_handler -blocksize 1024 -timeout 6000 -headers {Accept-Encoding identity}]} uerrmsg]} { + if {[catch {set utoken [::http::geturl $urlStr -timeout 6000 -headers {Accept-Encoding identity}]} uerrmsg]} { urllog_verb_msg $urlNick $urlChan "$urlmsg_ioerror ($uerrmsg)" urllog_log "HTTP request failed: $uerrmsg" return 0