Jump to content

Is there a way to get cURL to stop sending a header


tibberous

Recommended Posts

cURL keeps sending the header:

 

HTTP_EXPECT = 100-continue

 

I'm thinking this is causing an error on the server I am interfacing with, because I get http code 417: The expectation given in the Expect request-header could not be fulfilled by the server.

 

Is there some way I can disable this? I'm pretty sure it would work fine without it - Firefox doesn't send it and it works.

Doesn't work.

 

Either does:

 

curl_setopt($ch, CURLOPT_HTTPHEADER, array("HTTP_EXPECT: 0"));

curl_setopt($ch, CURLOPT_HTTPHEADER, array("HTTP_EXPECT: "));

curl_setopt($ch, CURLOPT_HTTPHEADER, array("HTTP_EXPECT:"));

 

Problem is that cURL is sending a file upload. If it wasn't for that I wouldn't use cURL at all and just use sockets.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.