Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c0a21d00691cc57024bd6b75e8a7c40ecbcffb28
Ticket: 3599395fffffffffffffffffffffffffffffffff
http assumes status line is a proper tcl list
User & Date: dvrsn on 2013-01-04 00:30:43
Changes

  1. assignee changed to: "patthoyts"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The http package implicitly assumes that the response status line is a proper tcl list.  The http specification does not guarantee this:
          Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
          Reason-Phrase  = *<TEXT, excluding CR, LF>
    
    If the http status like is, for example
    HTTP/1.0 200 This server is "ok", for now
    http::geturl will choke on it with an error like
    
    list element in quotes followed by "," instead of space
        while executing
    "lindex $state(http) 1"
        (procedure "http::Event" line 26)
        invoked from within
    "http::Event sock6 ::http::2"
    
    The line at fault appears to be
                if {$state(http) == "" || [lindex $state(http) 1] == 100} {
    
    Changing that to 
                if {$state(http) == "" || [string is list $state(http)] && [lindex $state(http) 1] == 100} {
    
    would fix this error, although it might then miss the "100 Continue" status it was looking for.
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "dvrsn"
  10. subsystem changed to: "29. http Package"
  11. title changed to: "http assumes status line is a proper tcl list"
  12. type changed to: "Bug"