Add trailing CRLF in all client requests. - gopher-tutorials - The gopher tutor… | |
git clone git://bitreich.org/gopher-tutorials/ git://enlrupgkhuxnvlhsf6lc3fziv5… | |
Log | |
Files | |
Refs | |
Tags | |
--- | |
commit bacac60c92069254399bca491c31bf885588c48e | |
parent aad77fbd0088739b958b2ed7a92f712d0d17c7de | |
Author: Leonardo Taccari <[email protected]> | |
Date: Sat, 15 Jun 2019 18:39:20 +0200 | |
Add trailing CRLF in all client requests. | |
Signed-off-by: Christoph Lohmann <[email protected]> | |
Diffstat: | |
M cmdline.txt | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/cmdline.txt b/cmdline.txt | |
@@ -10,7 +10,7 @@ request string and then netcat to send it to the remote serve… | |
A request of the file "/tutorials/cmdline.txt" will looks like this : | |
- printf "/tutorials/cmdline.txt" | nc somedomain.com 70 | |
+ printf "/tutorials/cmdline.txt\r\n" | nc somedomain.com 70 | |
You will get the server answer directly into your output. Be careful | |
if you ask binary files, it will be displayed on your screen, this is | |
@@ -21,7 +21,7 @@ another software (or using tee for both at the same time). | |
The following example will download a music file, save it on the | |
filesystem and play it with mpv while downloading. | |
- printf "/some_music.ogg" | tee saved_music.ogg | mpv - | |
+ printf "/some_music.ogg\r\n" | tee saved_music.ogg | mpv - | |
You may have seen that the data type is not part of the request | |
string, this is because it is only useful for the client to decide how |