Code Monkey home page Code Monkey logo

Comments (3)

iMacTia avatar iMacTia commented on September 17, 2024 2

Which I found quite interesting, especially pre HTTP/2.
That's exactly my thought and why I was curious to ask. If the connection is "idle" that would mean the ruby program is doing something else, meaning that it's probably not even listening to the connection.

The only way this could happen is if there was some sort of async listener (e.g. in a separate thread/fiber) or MAYBE, the way this works is that next time you fire a request on that connection, the adapter receives the 408 response that came earlier on?

Anyways, this is just curiosity πŸ˜„ it doesn't really stops adding the next error

from faraday.

iMacTia avatar iMacTia commented on September 17, 2024 1

Hi @tisba πŸ‘‹, no real reason for it to be missing, we simply add specific classes only for common errors.
There's no downside to adding a new class that inherits from ClientError, so a PR that does that would be welcome.

Out of curiosity, are you experiencing this error under some special circumstances? I checked the RFC and it says that the error is normally sent on an "idle connection". That sounds like something hard to achieve with Ruby unless you're doing parallel/concurrent requests?

from faraday.

tisba avatar tisba commented on September 17, 2024 1

We're using the net_http_persistent adapter. Maybe that's because of this. We don't see it often, it would just be easier for us to handle with an exception and it would help to keep the code clean.

According to https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408:

[…]It is sent on an idle connection by some servers, even without any previous request by the client.

Which I found quite interesting, especially pre HTTP/2. I've been doing web stuff for a long time by now and lot's of performance testing… I've never seen HTTP 408 before 🀷

from faraday.

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.