Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 79d1449f6ff631731eef0223fbade2b9a9acdaab
Ticket: 3498327fffffffffffffffffffffffffffffffff
http::formatQuery RFC 3986 compliance, AWS Compatibility fix
User & Date: samoconnor on 2012-03-07 07:17:48
Changes

  1. assignee changed to: "patthoyts"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    http://tools.ietf.org/html/rfc3986 2.1. says:
    "... URI producers and normalizers should use uppercase hexadecimal digits for all percent-encodings."
    
    The patch below fixes the encoding map created in http::init to use uppercase hex digits.
    Lower case hex encoding currently produced by Tcl's http:: causes at least one Amazon AWS authentication scheme to fail.
    As it stands, every Tcl AWS tool has to implement its own special url encoder (e.g. tclib::3S, tclcloud, etc).
    With this patch http::formatQuery can be used to prepare AWS requests.
    
    See http://docs.amazonwebservices.com/AWSSimpleQueueService/2011-10-01/SQSDeveloperGuide/Query_QueryAuth.html.
    
    
    --- tcl8.6b1/library/http/http.tcl.orig2012-03-07 17:57:05.000000000 +1100
    +++ tcl8.6b1/library/http/http.tcl2012-03-07 17:57:15.000000000 +1100
    @@ -39,7 +39,7 @@
     for {set i 0} {$i <= 256} {incr i} {
         set c [format %c $i]
         if {![string match {[-._~a-zA-Z0-9]} $c]} {
    -set map($c) %[format %.2x $i]
    +set map($c) %[format %.2X $i]
         }
     }
     # These are handled specially
    
    
    In the meantime the following "dynamic" patch serves a work-around:
    
    dict for {n v} $::http::formMap {
        dict set ::http::formMap $n [string toupper $v]
    }
    
    
    
  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: "samoconnor"
  10. subsystem changed to: "29. http Package"
  11. title changed to:
    http::formatQuery RFC 3986 compliance, AWS Compatibility fix
    
  12. type changed to: "Patch"