PHP Classes

Setting Content-Type is not passed to dependency http lib

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  Setting Content-Type is not passed...  >  (Un) Subscribe thread alerts  
Subject:Setting Content-Type is not passed...
Summary:Typo in variable name results in failure to pass Content-Type
Messages:3
Author:Meitar
Date:2014-04-12 00:57:44
Update:2014-04-12 07:05:42
 

  1. Setting Content-Type is not passed...   Reply   Report abuse  
Picture of Meitar Meitar - 2014-04-12 00:57:44
Hi,

On line 1244 of version 1.93 released 2014-04-11 of oauth_client.php, which reads:

$file['ContentType'] = (IsSet($value['Content-Type']) ? $value['Content-Type'] : 'automatic/name');

There is a bug that fails to pass the expected Content-Type parameter to the dependent http.php library. The variable $file['ContentType'] should be $file['Content-Type'], with a dash, not ContentType, without a dash.

Cheers,
-M

  2. Re: Setting Content-Type is not passed...   Reply   Report abuse  
Picture of Meitar Meitar - 2014-04-12 00:59:05 - In reply to message 1 from Meitar
Oh yeah, might also be a good idea to update the documentation to reflect that Content-Type (with a dash) is the expected way to set a file's Content-Type header manually. Currently, the documentation reads "ContentType" (without a dash) for this.

  3. Re: Setting Content-Type is not passed...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-04-12 07:05:42 - In reply to message 1 from Meitar
Yes, the array entry names were inverted. I fixed it on the latest version. Thank you for reporting.