php / php/php-src

OpenSSL streams liveness check should be always non blocking

未关闭
#13,489 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Extension: openssl Feature
主要语言
C
星标
40.4k
派生
8.2k
平均合并
2 天 13 小时
30 天内合并 PR
96

描述

Description

Currently all OpenSSL streams use TCP connection. There is no point for liveness check to ever use timeout and it makes the check with and without timeout inconsistent because if it's used without timeout (which is always the case for internal PHP function like php_stream_eof), then it succeed even if no data is read - it fails only if there is an error - this is especially important for non blocking mode. However if it's used with timeout and the timeout expires, it return false. There does not seem much advantage to do that and considering that it is unused and it makes the code significantly more complex, we should remove this handling and always return immediately.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

定位 OpenSSL stream liveness-check 的实现,并检查如何处理 timeout 和 non-blocking 路径。当检查能够在不进行 timeout 处理的情况下立即返回,同时保留文档所述的错误和 non-blocking stream 行为时,工作即告完成;如果 repository 提供相关的 stream 测试,请找出或运行这些测试。

由索引模型根据 Issue 内容生成。

评估

技术栈
c
领域
networking
Issue 类型
重构
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。