Snippet - 400 Bad Header Name When Calling the SugarCRM REST API Via CURL When SugarCRM is on IIS

Most PHP developers use CURL to build REST calls to the SugarCRM REST API. These REST calls need thorough testing but there are factors that need to be accounted for such as the ability to make REST calls against both Apache and IIS systems.


Should you receive the 400 Bad Header Name error code while testing against SugarCRM REST hosted on IIS then it is likely the User-Agent. Unset the User-Agent and try again. Then move forward with troubleshooting the user-agent string.



Author: Josh Sweeney
Last Edited: May 24, 2010
CRM: SugarCRM