• The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Error 400 on POST request

jojo

New Pleskian
Hi,

When I perform a post request to a PHP script everything works fine, until I increase the header size, then I get an Error 400.

In the request header I have Token field, if it has around 14 characters or less, then the POST request goes through just fine, and I get read the token from the header.
If I increase the token size from 14 characters to something around 20 characters for example, I get error 400 and the post request fails.

The request header looks like this: (C++)
Code:
String data;
  data = F("POST /create.php HTTP/1.1\r\n");
  data += F("cache-control: no-cache\r\n");
  data += F("Content-Type: multipart/form-data; boundary=");
  data += BOUNDARY;
  data += "\r\n";
  data += F("User-Agent: mydevice/0.0.1\r\n");
  data += F("Accept: */*\r\n");
  data += F("Host: ");
  data += SERVER;
  data += F("\r\n");
  data += F("token: ");
  data += token;           // if this token is "1234567890101112" it works, if it's more than that, 400 error.
  data += "\r\n";
  data += F("accept-encoding: gzip, deflate\r\n");
  data += F("Connection: keep-alive\r\n");
  data += F("content-length: ");
  data += String(length);
  data += "\r\n";
  data += "\r\n";
  return (data);

Any help is appreciated.
 
Back
Top