Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.7.0

Request #13611 add optional content-type header to multipart/form-data post elements
Submitted: 2008-04-07 04:20 UTC
From: tristanl Assigned:
Status: No Feedback Package: HTTP_Request2
PHP Version: 5.2.4 OS: w32
Roadmaps: (Not assigned)    
Subscription  


 [2008-04-07 04:20 UTC] tristanl (Tristan Ludowyk)
Description: ------------ RFC 2388 part 3. says all parts in a multipart/form-data request can have an optional content-type (which can include a charset also). I've added this as a parameter to addPostData() (similar to the declaration for addFile()). The change is implemented by adding an array member to the class, called postDataContentTypes. Each value in this array applies to a "root" form element (so it applies to each element in an array form value). This has meant customising the flattenArray() function so that it is now no longer generic - it references this member variable. The result of flattenArray now returns a value/type pair in an array instead of just a single value, and the code in buildRequest is modified accordingly Test script: --------------- see attached patch

Comments

 [2008-10-09 10:41 UTC] avb (Alexey Borzov)
Out of curiosity, are there any servers that will actually take advantage of this additional info?
 [2009-02-04 17:02 UTC] avb (Alexey Borzov)
-Status: Open +Status: Feedback -Package: HTTP_Request +Package: HTTP_Request2
Moving to HTTP_Request2, still waiting for feedback.
 [2009-10-03 15:02 UTC] avb (Alexey Borzov)
-Status: Feedback +Status: No Feedback
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.