mirror of https://github.com/axmolengine/axmol.git
Set default value for `Content-Type` of headfield in `PUT` method
This commit is contained in:
parent
75dc45bfea
commit
fec0d9c41d
|
@ -170,6 +170,10 @@ static int processTask(HttpRequest *request, NSString* requestType, void *stream
|
|||
//if request type is post or put,set header and data
|
||||
if([requestType isEqual: @"POST"] || [requestType isEqual: @"PUT"])
|
||||
{
|
||||
if ([requestType isEqual: @"PUT"])
|
||||
{
|
||||
[nsrequest setValue: @"application/x-www-form-urlencoded" forHTTPHeaderField: @"Content-Type"];
|
||||
}
|
||||
/* get custom header data (if set) */
|
||||
std::vector<std::string> headers=request->getHeaders();
|
||||
if(!headers.empty())
|
||||
|
|
Loading…
Reference in New Issue