Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004832 [Quercus] major always 10-29-11 17:46 06-21-12 13:58
Reporter jamesdlow View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.14
Summary 0004832: Curl ignores what is set in the "Content-Type" Header for a POST
Description This is because it is only gets it from PostBody in com.caucho.quercus.lib.curl.HttpPostRequest.java instead of from the curl object curl.getRequestPropertiesMap().get("Content-Type")

I have uploaded a working version that conditionally checks the curl object before it gets it from the PostBody.

In PHP it is ignoring this:
<?php
$curl_handle = curl_init();
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, 'Content-Type: application/json');
?>
Additional Information
Attached Files  HttpPostRequest.java [^] (3,437 bytes) 10-29-11 17:46

- Relationships

- Notes
(0005925)
nam
06-21-12 13:58

php/5033

Fixed for 4.0.29. The following should work now:

  curl_setopt($curl_handle, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
 

- Issue History
Date Modified Username Field Change
10-29-11 17:46 jamesdlow New Issue
10-29-11 17:46 jamesdlow File Added: HttpPostRequest.java
10-29-11 17:46 jamesdlow Issue Monitored: jamesdlow
06-21-12 13:39 nam Status new => assigned
06-21-12 13:39 nam Assigned To  => nam
06-21-12 13:58 nam Status assigned => closed
06-21-12 13:58 nam Note Added: 0005925
06-21-12 13:58 nam Resolution open => fixed


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker