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

使用Go服务器时,readsome阻塞问题 #7

Open
BBDXF opened this issue Aug 4, 2017 · 3 comments
Open

使用Go服务器时,readsome阻塞问题 #7

BBDXF opened this issue Aug 4, 2017 · 3 comments
Assignees

Comments

@BBDXF
Copy link

BBDXF commented Aug 4, 2017

在原始http/asio/Transport.cpp中,当服务器使用Transfer-Encoding: chunked 方式时,没有问题,但是在Go服务器中,没有使用这种方式,导致137行的readsome阻塞,程序无反应,修改方式如下:

// 125-129
bool nosize = !len;
size_t n = std::min<size_t>(len, response.size()); // 将header修改为response
for (size_t i = 0; i < n; ++i, --len) {
    responseStream << (char) response_stream.get();
};
@BBDXF
Copy link
Author

BBDXF commented Aug 4, 2017

同时,使用VS编译时,因为有两套Client.h&cpp文件,编译会出现警告,并且生成时找不到部分实现,修改其中一套文件名就可以正常通过了!

@BBDXF
Copy link
Author

BBDXF commented Aug 4, 2017

建议使用boost库中的asio,否则编译问题很多....

@BBDXF
Copy link
Author

BBDXF commented Aug 4, 2017

修改完成的vs项目 https://github.com/BBDXF/hprosec1x-vs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants