curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Libcurl 7.86.0 issue with reverse proxy server

From: Purvi Prajapati via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 11 Jan 2024 09:58:43 +0000

Hello,

We have a problem with libcurl library with big request body when IHS (IBM HTTP Server) is used as reverse proxy.

Library version: libcurl 7.86.0

Problem background: When we have a big request body, we receive this error message "Failure when receiving data from the peer". This is happening only when IHS is set as reverse proxy. This is working fine without proxy set up. We are using libcurl with GSKit.

Our analysis: Further digging into the curl library code, we identified that the issue might lie in "easy.c" file, in function "easy_transfer".
The suspected code line is as below:
if(!mcode)
      mcode = curl_multi_perform(multi, &still_running);

If I put some delay after this code line (using sleep call), I observed that the issue is not happening for the failed scenario. However, this is creating unnecessary delay in processing the request (and still fail in very specific scenario of big request).

We are suspecting the issue with synchronization and socket is getting closed (may be??) however not sure.
We did observe that this issue is not happening with libcurl 7.76.1 library version with IHS as reverse proxy.

Workaround identified (none is accepted though):

  * Downgrade the library to 7.76.1 (Not accepted due to vulnerabilities)
  * Put some delay after suspected function call. However, this is creating unnecessary delay in processing of request.
This is creating data lost and any pointer on what has changed between the libcurl version 7.76.1 and 7.86.0 which might have created this issue with proxy server, is really appreciated.

Regards,
Purvi Prajapati




-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-01-11