Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.6.0, 1.6.1
-
Fix Version/s: 1.6.2
-
Component/s: Zend_Http_Client
-
Labels:None
-
Fix Version Priority:Should Have
Description
When uploading files to a particular web application I'm working with using Zend_Http_Client, the web application does not see the files that I'm uploading using $zendHttpClient->setFileUpload(). However, if I change the Content-type header for the file part(s) to "Content-Type" (with a capital "T"), and the Content-disposition header to "Content-Disposition" (with a capital "D"), the file and its type is recognized. I've verified that the capitalization of both headers must be changed in order for the web application to recognize the files.
I realize that this is probably a bug in the web application I'm interfacing with, but unfortunately I don't have control over that application. According to my tests, at least IE 7 uses the Content-Type (capital "T") and Content-Disposition (capital "D") headers.
Changing the capitalization of these headers in Zend/Http/Client.php @ r11407 on lines 1012 and 1130 appears to fix this.
Change as following in SVN r11768
1. Create 2 constants, CONTENT_TYPE and CONTENT_LENGTH.
Use CONTENT_TYPE instead of 'Content-type' and CONTENT_LENGTH instead of 'Content-length'.
2. Change from 'Content-disposition' to 'Content-Disposition' . Capitalization of 'D'.
3. Change from 'User-agent' to 'User-Agent' . Capitalization of 'A'.