Tcl Library Source Code

View Ticket
Bounty program for improvements to Tcl and certain Tcl packages.
Ticket UUID: 3496110
Title: ::S3 missing "Host:" header
Type: Patch Version: None
Submitter: samoconnor Created on: 2012-03-01 22:18:55
Subsystem: amazon-s3 Assigned To: aku
Priority: 5 Medium Severity: Severe
Status: Closed Last Modified: 2014-06-23 18:36:37
Resolution: Fixed Closed By:
    Closed on:
::S3 does not send a "Host:" header.
This causes "HTTP/1.1 400 Bad Request" to be returned by some transparent proxies.
(e.g. when using Telstra 3G through the telstra.iph APN).

The patch below sets the host header.

--- /System/Library/Tcl/tcllib1.12/amazon-s3/S3.tcl.orig2012-02-25 15:32:45.000000000 +1100
+++ /System/Library/Tcl/tcllib1.12/amazon-s3/S3.tcl2012-03-02 09:13:07.000000000 +1100
@@ -252,6 +252,7 @@
     if {${content-type} != ""} {
 dict set headers content-type ${content-type}
+    dict set headers host 
     set xamz ""
     foreach key [lsort [dict keys $headers x-amz-*]] {
 # Assume each is seen only once, for now, and is canonical already.
User Comments: aku added on 2014-06-23 18:36:37:
Fixed contact information on closed/fixed ticket.

aku added on 2014-06-20 18:23:48:
Applied in revision [7904002443]. Version bumped to 1.0.1.
Thank you.
And apologies for the long delay.