0

Is want to send the content-length header with incorrect body length

I did try use Prepared Requests

But when trying set

prepped.headers['Content-Length'] = 2

And set this body for request

testtest

it will send te only and i want to send testtest with Conten-Length: 2

abdallaEG
  • 103
  • 1
  • 6
  • 1
    Are you sure it's not the receiving web server that only reads the Content-Length number of bytes in the request? I.e. your code might be sending `testtest`, but the server might only be reading the first two bytes? – D Malan Oct 21 '22 at 11:56
  • Yes. The server did read the body set in content-length Thank you for that – abdallaEG Oct 21 '22 at 12:02

0 Answers0