Skip to main content
Solved

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

  • October 18, 2018
  • 2 replies
  • 129 views

fmelizard
Contributor
Forum|alt.badge.img+17

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.

View original
Did this help you find an answer to your question?

2 replies

Forum|alt.badge.img+2

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+1
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings