Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

403 Response on POST Request - SIRSTEVEHQ CP

As part of our Web Application Firewall we occasionally filter invalid POST requests when we detect malicious traffic towards our network.

This shouldn't cause any problems with software that is using standard HTTP POST requests to reach your website. However, if you've written a custom application you will need to ensure the code making the POST is setting the appropriate Content-Length header in the request.

curl/libcurl will do this by default if you send any HTTP POST data. But if your custom code is simply overriding the HTTP method to POST without setting/sending any data, this header may be missing and result in the block.

You can easily resolve this by setting this header manually, for example:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($fields)));

However, it may be easier to simply use the built-in POST fields which automatically populate this header as required.

curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Can I install Xdebug on the shared platform? - SIRSTEVEHQ CP

No. Xdebug can't be installed on the shared platform (WordPress-Optimised Hosting and Cloud...

Can I install ZeroMQ on the shared hosting platform? - SIRSTEVEHQ CP

No.  ZeroMQ can't be installed on the shared platform (Cloud Hosting & WordPress Hosting) as...

What is Autoscale? - SIRSTEVEHQ CP

Autoscale is our latest hosting solution designed specifically for demanding websites that...

Do you disallow any WordPress plugins on your WordPress platform? - SIRSTEVEHQ CP

Our WordPress platform was designed and built exclusively for WordPress. This level of platform...

Temporary URLs: what are they and what are they used for? - SIRSTEVEHQ CP

When you order a Cloud hosting or WordPress hosting, you're automatically given a temporary URL....