My favorites | Sign in
Project Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 497: Content-Disposition header being lowercased
1 person starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----
Type-Defect
Version-later
Component-HttpRequest


Sign in to add a comment
 
Reported by f...@google.com, May 15, 2008
 The following code snippet:

  var request = google.gears.factory.create('beta.httprequest');
  request.onreadystatechange = this.onStateChange.bind(this,
                                                       request,
                                                       onComplete);
  request.open('POST', this.url_ + up.UPLOAD_PATH);
  request.setRequestHeader('Content-Disposition', 'attachment; filename="' +
                           this.sessionId_ + '"');
  request.setRequestHeader('Content-Type', 'application/octet-stream');
  request.setRequestHeader('Content-Range', 'bytes ' + range);
  return request.send(data);

Is resulting in the following HTTP request:

  POST /upload HTTP/1.1
  Host: 0.apps-upload-test.uploader.apps-upload.pq.borg.google.com:25380
  User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.14)
Gecko/20080417 Firefox/2.0.0.14
  Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Language: en-us,en;q=0.5
  Accept-Encoding: gzip,deflate
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive: 300
  Connection: keep-alive
  content-disposition: attachment; filename="42fd8f6d60e1fc7c:76a794b33e6dff0b"
  Content-Type: application/octet-stream
  Content-Range: bytes 0-330/676
  ...

Note that Content-Disposition was set in uppercase, but transmitted in
lowercase.

Comment 1 by gears.team.cprince, May 15, 2008
It makes sense to preserve the case of the string a caller passes in.

Michael, any ideas why this this happening?  Was there another reason for normalizing
setRequestHeader() arguments?
Owner: gears.team.michaeln
Labels: -Priority-Medium Version-0.4
Comment 2 by gears.team.zork, Jul 22, 2008
(No comment was entered for this change.)
Owner: gears.team.cprince
Comment 3 by gears.team.cprince, Jul 23, 2008
Charles says this isn't blocking him, and it can happen after the 0.4 release.
Labels: -Version-0.4 Version-later
Comment 4 by gears.team.cprince, Jul 23, 2008
(No comment was entered for this change.)
Owner: ---
Comment 5 by gears.team.michaeln, Sep 16, 2008
(No comment was entered for this change.)
Labels: Component-HttpRequest
Sign in to add a comment

Hosted by Google Code