Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes HttpClient Content.Source reads from arbitrary threads #12203

Merged
merged 8 commits into from
Aug 30, 2024

Commits on Aug 26, 2024

  1. Reworked HttpReceiverOverHTTP state machine, in particular:

    * Introduced a boolean parameter to parseAndFill() and parse(), that specifies whether to notify the application demand callback.
      This is necessary because reads may happen from any threads, and must not notify the application demand callback.
      Only when there is no data, and fill interest is set, then the application demand callback must be notified.
    * Removed action field to avoid lambda allocation.
    * Now the application is called directly from the parse() method.
    * Reading -1 from the network drives the parser by calling again parse(), rather than the parser directly.
      This allows to have a central place to notify the response success event.
    
    Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
    sbordet committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    e9d4331 View commit details
    Browse the repository at this point in the history
  2. Fixed test flakyness: consume the request content before sending the …

    …response.
    
    Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
    sbordet committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    f633ccc View commit details
    Browse the repository at this point in the history
  3. Follow up after #10880: only abort the request if there is request co…

    …ntent.
    
    This avoids the rare case where the response arrives before the request thread has modified the request state, even if the request has been fully sent over the network, causing the request to be failed even if it should not.
    
    Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
    sbordet committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    d84cc66 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. Fixed FastCGI similarly to HTTP/1.1.

    Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
    sbordet committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    a7cf43f View commit details
    Browse the repository at this point in the history
  2. Removed leftover of the multiplex implementation.

    Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
    sbordet committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    2411478 View commit details
    Browse the repository at this point in the history
  3. add SerializedInvoker assertions about current thread invoking

    Signed-off-by: Ludovic Orban <lorban@bitronix.be>
    lorban committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    01fe947 View commit details
    Browse the repository at this point in the history
  4. name all SerializedInvoker instances

    Signed-off-by: Ludovic Orban <lorban@bitronix.be>
    lorban committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    694d088 View commit details
    Browse the repository at this point in the history
  5. handle review comments

    Signed-off-by: Ludovic Orban <lorban@bitronix.be>
    lorban committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    3e27919 View commit details
    Browse the repository at this point in the history