-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Telnet: Write full buffer instead of byte-by-byte #1389
Conversation
@richardhsu, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bagder, @yangtse and @dfandrich to be potential reviewers. |
adb6f62
to
157b762
Compare
We don't have any TELNET test server so the only possible way right now, without adding such a test server, is probably to send a HTTP 1.0 request via TELNET to the HTTP test server and make sure that works as expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the change looks fine. The double looping over the contents is unfortunate, but I can't see an easy way to avoid that.
157b762
to
5bc29ab
Compare
@bagder thanks! Also added a |
@bagder looks like checks and tests pass, let me know if I should add anything more in order to get this merged, thank you! I've also been running this on my local machine for my use case and it is working as expected. |
My gcc complains since there's a comparison of a signed character with 255 (
|
5bc29ab
to
30089b0
Compare
@bagder Ah, yes, thanks, updated the |
@bagder Hi, was wondering if there's any other issues before getting this merged? Thanks :) |
I still see two compiler warnings/errors (
|
Previous TODO wanting to write in chunks. We should support writing more at once since some TELNET servers may respond immediately upon first byte written such as WHOIS servers.
30089b0
to
152fd0f
Compare
@bagder Ah awesome, thanks, the |
thanks! |
The new test hangs infinitely on MinGW, also all the MinGW autobuilds have been failing since then. I haven't found time to debug this yet. |
Oh hmm, sorry about that. Looks like 9e093f0#diff-7b143a8d3555776816bc29d9cb83e6a2 actually addresses such issue I think. I believe then the |
Previous TODO wanting to write in chunks. We should support writing more
at once since some TELNET servers may respond immediately upon first
byte written such as WHOIS servers.
Was attempting to use CURL to connect to WHOIS servers and found that certain servers didn't work well with
send_telnet_data
sending byte-by-byte. SawTODO
so attempted to do it.Have the following concerns:
Curl_write
send as much as possible and loop until completion.Thanks