Score:1

Curl 'Expect: 100-continue' and empty response on some clients

cn flag

I have a php script which is communicating with an external API via curl requests. Suddenly last week some requests got an empty response from the server, instead of the requested data (although the action was performed on the server). Affected were for example the upload of pictures or the update of a larger data set. On other clients the same requests were working as expected, so I suspected that it is a client side problem. So I compared the curl versions first:

Client with empty response: curl 7.64.0
Client with expected response: curl 7.81.0

What made me wondering was that the curl version 7.64.0 was still the same as the weeks before when everything was still working. So I compared the HTTP headers send by curl to the server. And it turned out that on the client with curl 7.64.0 "Expect: 100-continue" was added to the header. This isn't the case on the client with curl 7.81.0. So as workaround I override the "Expect" value in curls HTTP header option with 'Expect:'. Now it is working again as expected.

This leaves me with a few questions:
Why does curl 7.64.0 adds "Expect: 100-continue" and curl 7.81.0 does not?
Is it correct that the API server is answering with an empty response to those requests?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.