L
L
Lorem Ipsum2020-11-18 17:42:15
PHP
Lorem Ipsum, 2020-11-18 17:42:15

Why is the 400 error coming?

Hello.
I'm trying to log in to 1C via CURL, but for some reason I get an error:

Bad Request - Invalid Content Length
HTTP Error 400. There is an invalid content length or chunk length in the request.

PHP:

<?php
$curl = curl_init('http://1c/dev_bpms/hs/BPMS/Run');
// curl_setopt($curl, CURLOPT_HEADER, 1);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_USERPWD, 'LOGIN:PASSWORD');
// curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_exec($curl);

I also tried uncommenting all + lines in different order, but the error is the same.

Help, please, to solve a problem.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question