title: Invalid header field value in Go ONLY on kubernetes/CoreOS
body: <p>I have a Go program that uses aws-sdk-go to talk to dynamodb. Dependencies are vendored. Go version 1.7.1. aws-sdk-go version 1.6.24. The program works as expected in all the following environments:</p>
  
  <ul>
  <li>dev box from shell (Arch Linux)  </li>
  <li>docker container running on my dev box (Docker 1.13.1)  </li>
  <li>Ec2 instance from shell (Ubuntu 16.04)</li>
  </ul>
  
  <p>When I run the docker container on kubernetes (same one I tested on my dev box),  I get the following error:</p>
  
  <pre>
  
  2017/03/02 22:30:13 DEBUG ERROR: Request dynamodb/GetItem:
  ---[ REQUEST DUMP ERROR ]-----------------------------
  net/http: invalid header field value "AWS4-HMAC-SHA256 Credential=hidden\n/20170302/us-east-1/dynamodb/aws4_request, SignedHeaders=accept-encoding;content-length;content-type;host;x-amz-date;x-amz-target, Signature=483f56dd0b17d8945d3c2f2044b7f97e531190602f132a4d5f828264b3a2cff2" for key Authorization
  -----------------------------------------------------
  
  2017/03/02 22:30:13 DEBUG: Response dynamodb/GetItem Details:
  ---[ RESPONSE ]--------------------------------------
  HTTP/0.0 000 status code 0
  Content-Length: 0
  
  </pre>
  
  <p>Based on:<br>
  <a href="https://golang.org/src/net/http/transport.go" rel="noreferrer">https://golang.org/src/net/http/transport.go</a><br>
  <a href="https://godoc.org/golang.org/x/net/lex/httplex#ValidHeaderFieldValue" rel="noreferrer">https://godoc.org/golang.org/x/net/lex/httplex#ValidHeaderFieldValue</a>  </p>
  
  <p>It looks like the problem is with the header value validation, yet I am at a loss to understand why it works everywhere except on my k8s cluster. The cluster is composed of Ec2 instances running the latest CoreOS stable ami (CoreOS stable 1235.8.0)</p>
  
  <p>The docker image that works on my dev machine is scratch based. To troubleshoot I created an image based on Ubuntu latest with a separate go program that just does a simple get item from dynamodb. When this image is run on my k8s cluster and the program run from an interactive shell, I get the same errors. I have confirmed I can ping the dynamodb endpoints from this env.</p>
  
  <p>I am having a hard time troubleshooting this issue: am I missing something stupid here? Can someone point me in the right direction or have an idea of what is going on?</p>