My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 497: Content-Disposition header being lowercased
2 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  ----


Sign in to add a comment
 
Project Member 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.

May 15, 2008
Project Member #1 gears.te...@gmail.com
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
Jul 22, 2008
Project Member #2 gears.te...@gmail.com
(No comment was entered for this change.)
Owner: gears.team.cprince
Jul 23, 2008
Project Member #3 gears.te...@gmail.com
Charles says this isn't blocking him, and it can happen after the 0.4 release.
Labels: -Version-0.4 Version-later
Jul 23, 2008
Project Member #4 gears.te...@gmail.com
(No comment was entered for this change.)
Owner: ---
Sep 16, 2008
Project Member #5 gears.te...@gmail.com
(No comment was entered for this change.)
Labels: Component-HttpRequest
Sign in to add a comment

Powered by Google Project Hosting