title: Google Drive Upload API Resumable REST gives back 400 Bad Request
body: <p>I am trying to follow the resumable media upload for google drive api from this link. 
  <a href="https://developers.google.com/drive/manage-uploads#resumable" rel="nofollow">https://developers.google.com/drive/manage-uploads#resumable</a></p>
  
  <p>My first request goes through fine and I get back a second url in the Location header. 
  However, when I make the second PUT call given in the documentation, it throws back a bad request. </p>
  
  <pre><code>Request 1: 
  
  POST https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable
  
  Request Header 1: 
  
  Content-Type: application/json
  Authorization: Bearer ya..
  X-Upload-Content-Type: text/plain
  X-Upload-Content-Length: 112
  Host: www.googleapis.com
  Content-Length: 112
  Body 
  
  {'title' : 'bravo122314.txt', 'mimeType': 'text/plain', 'parents' : [{'id': '0Bw5JasxEfsasa8NNsdU5dU123iVHc'}] } 
  
  
  Response Header 1:
  Location: https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&amp;upload_id=ASM
  Date: Tue, 03 Dec 2013 21:07:40 GMT
  Server: HTTP Upload Server Built on Nov 15 2013 16:02:54 (1384560174)
  Content-Length: 0
  Content-Type: text/html; charset=UTF-8
  </code></pre>
  
  <p>This is the following request </p>
  
  <pre><code>Request 2: 
  PUT https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable&amp;upload_id=ASM
  
  Request Header 2: 
  Authorization: Bearer ya..
  Content-Type: text/plain
  
  
  Response 2:
  
  {
  "error":{
  "errors":[
  {
  "domain":"global",
  "reason":"badRequest",
  "message":"Invalid Upload Request"
  }
  ],
  "code":400,
  "message":"Invalid Upload Request"
  }
  }
  </code></pre>
  
  <p>Has anyone faced this issue before? Am I missing some header? </p>