Needs review
Project:
REST Server
Version:
6.x-2.0-beta3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2010 at 19:10 UTC
Updated:
31 Dec 2010 at 20:04 UTC
The POST method only validates $_SERVER['CONTENT_TYPE'] for 'application/x-www-form-urlencoded' and not multipart/form-data. This match makes sure multipart passes as well.
Not sure whether this is the way to do it, but it works.
| Comment | File | Size | Author |
|---|---|---|---|
| RESTServer-multipart.patch | 768 bytes | toemaz |
Comments
Comment #1
lasconic commentedA better patch would be
since strpos does not play nice with == 0
Comment #2
matslats commentedBetter still, since my client is adding "; charset=UTF-8" to the Content_type header, and since, if that if statement fails, it goes on to run case 'PUT'
Comment #3
justageek commentedYeah, isn't this required if we want to upload a file to a REST URL?