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

curl: (18) transfer closed with 1600 bytes remaining to read #168

Closed
shiqishao opened this issue Nov 8, 2024 · 4 comments
Closed

curl: (18) transfer closed with 1600 bytes remaining to read #168

shiqishao opened this issue Nov 8, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@shiqishao
Copy link

mita版本:3.7.0 运行在ubuntu20.04上
mieru版本:3.7.0 运行在ubuntu20.04上

当我启动mieru后,运行如下命令会报错:
curl --proxy socks5://127.0.0.1:1080 http://new2.setn.top
报错信息:
curl: (18) transfer closed with 1600 bytes remaining to read

我该如何解决此问题?谢谢!

@enfein enfein added the bug Something isn't working label Nov 8, 2024
@enfein
Copy link
Owner

enfein commented Nov 8, 2024

应该是 bug 导致数据在完全写入之前关闭了网络连接。

@enfein
Copy link
Owner

enfein commented Nov 10, 2024

具体的问题应该是这样的:

大多数网站使用 HTTP keep alive,如果浏览器不关闭连接,服务器是不会关闭连接的。

这个上古网站行为不一样,在 HTTP 返回之后主动关闭网络连接。mieru 客户端收到关闭网络连接的请求之后会垃圾回收所有数据,如果这些数据还没有被 curl 取走,就会丢失。

@shiqishao
Copy link
Author

shiqishao commented Nov 10, 2024

具体的问题应该是这样的:

大多数网站使用 HTTP keep alive,如果浏览器不关闭连接,服务器是不会关闭连接的。

这个上古网站行为不一样,在 HTTP 返回之后主动关闭网络连接。mieru 客户端收到关闭网络连接的请求之后会垃圾回收所有数据,如果这些数据还没有被 curl 取走,就会丢失。

感谢大佬解惑

enfein added a commit that referenced this issue Nov 13, 2024
1. Allow applications to read data after network connection is closed (issue #168).
2. Update dependency versions.

Breaking change: the MTU value in client and server configuration now represent
the maximum transmission unit in UDP layer or nested network connection, rather
than in data-link layer. We don't recommend setting MTU value bigger than 1440.
TCP protocol is not affected.
@enfein
Copy link
Owner

enfein commented Nov 13, 2024

v3.8.0 修复了这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants