changeset 225:cb86368b8fcd

urllog: Change handling of HTTP requests.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 01 Dec 2014 11:11:50 +0200
parents aaf433ab696a
children 0ff78e418e77
files urllog.tcl
diffstat 1 files changed, 1 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- 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