Code Monkey home page Code Monkey logo

Comments (3)

edsiper avatar edsiper commented on August 18, 2024 2

thanks for reporting this. it has been assigned

from fluent-bit.

cosmo0920 avatar cosmo0920 commented on August 18, 2024 1

For providing an option to turn on/off and turned off by default, this issue could be resolved. However, if using the curl with enabled HTTP2, we need to implement another mechanism to return back the response during the HTTP2 connections. I'm jumping on it.

from fluent-bit.

cosmo0920 avatar cosmo0920 commented on August 18, 2024

I checked the curl code and I found that:

/* On HTTP 1.1, when connection is not to get closed, but no
Content-Length nor Transfer-Encoding chunked have been
received, according to RFC2616 section 4.4 point 5, we
assume that the server will close the connection to
signal the end of the document. */

Sited from: https://github.com/curl/curl/blob/9acf759455f96636bc2132339fc53f4094957be7/lib/http.c#L3494-L3506

This indicates that in_http always closes its connections because just returning HTTP status code and no body. This leads to disconnect HTTP connections on in_http plugin as per RFC2616 section 4.4 point 5.

ref: https://datatracker.ietf.org/doc/html/rfc2616#section-4.4

By contrast, in_splunk should be needed to return some of the body which mustn't be an empty.
So, curl itself always assumed that this connection shouldn't be closed when enabling keepalive.

Therefore, if we need to restore the previous behavior, we need to provide an option to turn on/off keepalive instead of always turned on.

from fluent-bit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.