Skip to main content
Solved

How to remove the Expect: 100-continue in the header when using the HTTPCaller?

  • October 18, 2018
  • 2 replies
  • 166 views

fmelizard
Safer
Forum|alt.badge.img+21

If I am using the HTTPCaller to send large amounts of data to server, it adds a Expect: 100-continue in the header of the request. Our server doesn't know how to respond to that and is causing problems. Is there any way to configure the HTTPCaller to not add that header?

Best answer by jlutherthomas

The HTTPCaller uses the libcurl library underneath, and it looks like libcurl will add the expect header when a PUT or POST is sending data over 1024mb. It also looks like if the recipient/client isn't sending a response (I'm not sure whether your server is responding at all) then it will send the data anyway after 1000ms.

 

From checking out this page , it looks like you can 'disable' the expect header, by including it as a header but leaving the value bank. In the HTTPCaller, try adding a header for Expect, but leave it blank by adding "" or '' - as you can't leave it blank in the transformer, it'll stay red.

 

 

That should then resolve the issue.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

Forum|alt.badge.img+2
  • Best Answer
  • October 18, 2018

The HTTPCaller uses the libcurl library underneath, and it looks like libcurl will add the expect header when a PUT or POST is sending data over 1024mb. It also looks like if the recipient/client isn't sending a response (I'm not sure whether your server is responding at all) then it will send the data anyway after 1000ms.

 

From checking out this page , it looks like you can 'disable' the expect header, by including it as a header but leaving the value bank. In the HTTPCaller, try adding a header for Expect, but leave it blank by adding "" or '' - as you can't leave it blank in the transformer, it'll stay red.

 

 

That should then resolve the issue.


peter_s
Contributor
Forum|alt.badge.img+4
  • Contributor
  • September 8, 2020

From my experience (as of FME 2019.2), the expect-header is added also for small amounts of data and the client (FME/libCurl) hangs forever if the server is not responding with 100-continue. The suggested way of setting an empty expect header works fine though.