mTCP DOS - NC documentation issue (design bug)? (Announce)
Hi Arjay,
I missed that other thread - thanks for pointing it out!
As always, it depends on the server. http://www.cnn.com and http://www.brutman.com will happily give you a default page even though the header is technically wrong.
A proper telnet newline is a carriage return and linefeed pair. Your post implies that only the LF is needed. If so, that's news to me - I thought that HTTP was expecting telnet newlines, not just plain LFs.
(Just in case, I gave the user a command line option for sending the Enter key as a carriage return, or a CR/LF pair when using it interactively. Ctrl-J and Ctrl-Enter can be used for sending just a pure line feed, and Ctrl-M for sending a pure CR if anybody never needs that.)
I'm going to be doing wget shortly, so I'll crisp up the docs then.
> Just referenced the mTCP version of NC
> in this
> forum reply. To be honest I've been too busy with my own
> coding/away from the keyboard activities to test mTCP yet.
>
> However I did note the following line in
> http://brutman.com/mTCP/nc.txt:
>
> "(If you send "GET /" without the quotes and press Enter, you will get a
> web page back!)"
>
> I don't know if this is the case with the mTCP version of NC but this is
> wrong you shouldn't get a webpage back on most servers if you do the above.
> This is an example of a correct basic GET request as per the RFC's:
>
> "GET / HTTP/1.0[LF]" where [LF] = character 0Ah
>
> or
>
> "GET / HTTP/1.1[LF]" where [LF] = character 0Ah
>
> The above should also be case sensitive.
>
> However be aware that some servers are so badly coded (or on purpose) that
> even this basic test may not work, e.g. "GET / HTTP/1.1" will work
> but "GET / HTTP/1.0" will NOT work or the server may sit there
> waiting for a longer url to be requested etc.
>
> Note: 0Ah can often be obtained by [CTRL]+[ENTER]. For anyone interesting
> in scripting reading this also note many DOS based editors allow you to
> insert control codes via [CTRL ^P] and followed by [CTRL whatever] where
> whatever is the approrpriate combination required, e.g. [CTRL]+[P] then
> [CTRL]+[ENTER] or [CTRL]+[P] then [CTRL]+[B] to insert a bell. This is
> useful to know if for example you wish to feed a text file via redirection
> to something like netcat.
>
> The vast majority of telnet based servers will tend to respond with a
> header if you just send a few LineFeeds (CTRL+[ENTER]) or if that fails try
> sending Carriage Returns (ENTER)'s instead or CRLF, it depends on the
> server and if the programmer has read the RFC's etc. In the case of HTTP
> servers, using sending a HEAD request instead of a GET request is also
> useful.
>
> For anyone needing more info:
> http://www.google.com/search?q=http+get+telnet
---
mTCP - TCP/IP apps for vintage DOS machines!
http://www.brutman.com/mTCP
Complete thread:
- mTCP DOS TCP/IP apps for small machines - mbbrutman, 21.01.2010, 18:06
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- mTCP DOS TCP/IP apps for small machines - Japheth, 22.01.2010, 09:47
- mTCP DOS TCP/IP apps for small machines - mbbrutman, 22.01.2010, 16:56
- mTCP DOS TCP/IP apps for small machines - mbbrutman, 07.02.2010, 16:35
- Forget the library .. time to open-source the code? - mbbrutman, 14.03.2010, 03:22
- Forget the library .. time to open-source the code? - Rugxulo, 14.03.2010, 03:56
- Forget the library .. time to open-source the code? - mbbrutman, 14.03.2010, 15:01
- mTCP new release 27/June/2010 - now ported to Open Watcom - Arjay, 27.06.2010, 22:27
- mTCP new release 27/June/2010 - now ported to Open Watcom - Rugxulo, 28.06.2010, 06:30
- mTCP new release 27/June/2010 - now ported to Open Watcom - DOS386, 28.06.2010, 12:05
- mTCP new release 27/June/2010 - now ported to Open Watcom - Arjay, 28.06.2010, 14:22
- mTCP new release 27/June/2010 - now ported to Open Watcom - mbbrutman, 01.07.2010, 07:08
- mTCP new release 27/June/2010 - now ported to Open Watcom - Laaca, 01.07.2010, 13:14
- mTCP new release 27/June/2010 - now ported to Open Watcom - mbbrutman, 01.07.2010, 16:06
- mTCP new release 27/June/2010 - now ported to Open Watcom - DOS386, 01.07.2010, 13:20
- mTCP new release 27/June/2010 - now ported to Open Watcom - mbbrutman, 01.07.2010, 16:03
- mTCP new release 27/June/2010 - now ported to Open Watcom - Laaca, 01.07.2010, 19:16
- mTCP new release 27/June/2010 - now ported to Open Watcom - mbbrutman, 03.07.2010, 16:04
- mTCP new release 27/June/2010 - now ported to Open Watcom - DOS386, 14.07.2010, 03:51
- mTCP new release 27/June/2010 - now ported to Open Watcom - Laaca, 01.07.2010, 19:16
- mTCP new release 27/June/2010 - now ported to Open Watcom - mbbrutman, 01.07.2010, 16:03
- mTCP new release 27/June/2010 - now ported to Open Watcom - Laaca, 01.07.2010, 13:14
- mTCP new release 27/June/2010 - now ported to Open Watcom - mbbrutman, 01.07.2010, 07:08
- mTCP new release 27/June/2010 - now ported to Open Watcom - Arjay, 28.06.2010, 14:22
- mTCP new release 27/June/2010 - now ported to Open Watcom - DOS386, 28.06.2010, 12:05
- mTCP new release 27/June/2010 - now ported to Open Watcom - Rugxulo, 28.06.2010, 06:30
- mTCP new release 27/June/2010 - now ported to Open Watcom - Arjay, 27.06.2010, 22:27
- Forget the library .. time to open-source the code? - mbbrutman, 14.03.2010, 15:01
- Forget the library .. time to open-source the code? - Rugxulo, 14.03.2010, 03:56
- mTCP DOS TCP/IP apps for small machines - mbbrutman, 22.01.2010, 16:56
- mTCP interfacing with TINY remote control for DOS? - Arjay, 20.07.2010, 12:41
- mTCP interfacing with TINY remote control for DOS? - mbbrutman, 20.07.2010, 16:09
- mTCP interfacing with TINY remote control for DOS? - Arjay, 20.07.2010, 17:49
- mTCP interfacing with TINY remote control for DOS? - mbbrutman, 20.07.2010, 16:09
- mTCP DOS - NC documentation issue (design bug)? - Arjay, 20.07.2010, 14:07
- mTCP DOS - NC documentation issue (design bug)? - mbbrutman, 20.07.2010, 15:22
- mTCP DOS - NC documentation issue (design bug)? - Arjay, 20.07.2010, 17:30
- mTCP DOS - NC documentation issue (design bug)? - mbbrutman, 20.07.2010, 19:32
- mTCP DOS - NC documentation issue (design bug)? - Arjay, 20.07.2010, 21:56
- FTP ASCII vs binary "image" - DOS386, 23.07.2010, 07:27
- FTP ASCII vs binary "image" - mbbrutman, 24.07.2010, 01:04
- FTP ASCII vs binary "image" - DOS386, 24.07.2010, 12:12
- FTP ASCII vs binary "image" - Japheth, 24.07.2010, 15:31
- FTP ASCII vs binary "image" - DOS386, 24.07.2010, 15:36
- FTP ASCII vs binary "image" - mbbrutman, 24.07.2010, 16:23
- FTP ASCII vs binary "image" - Japheth, 24.07.2010, 16:57
- FTP ASCII vs binary "image" - mbbrutman, 25.07.2010, 01:35
- FTP ASCII vs binary "image" - Rugxulo, 25.07.2010, 05:34
- FTP ASCII vs binary "image" - DOS386, 25.07.2010, 06:16
- FTP ASCII vs binary "image" - mbbrutman, 25.07.2010, 17:17
- FTP ASCII vs binary "image" | NTLFN issues - DOS386, 26.07.2010, 02:03
- FTP ASCII vs binary "image" | NTLFN issues - mbbrutman, 26.07.2010, 03:11
- FTP ASCII vs binary "image" | NTLFN issues - DOS386, 27.07.2010, 02:53
- FTP ASCII vs binary "image" | NTLFN issues - mbbrutman, 27.07.2010, 03:31
- FTP ASCII vs binary "image" | NTLFN issues - DOS386, 27.07.2010, 03:40
- FTP ASCII vs binary "image" | NTLFN issues - mbbrutman, 27.07.2010, 03:31
- FTP ASCII vs binary "image" | NTLFN issues - DOS386, 27.07.2010, 02:53
- FTP ASCII vs binary "image" | NTLFN issues - mbbrutman, 26.07.2010, 03:11
- FTP ASCII vs binary "image" | NTLFN issues - DOS386, 26.07.2010, 02:03
- FTP ASCII vs binary "image" - mbbrutman, 25.07.2010, 17:17
- FTP ASCII vs binary "image" - DOS386, 25.07.2010, 06:16
- FTP ASCII vs binary "image" - Rugxulo, 25.07.2010, 05:34
- FTP ASCII vs binary "image" - mbbrutman, 25.07.2010, 01:35
- FTP ASCII vs binary "image" - Japheth, 24.07.2010, 16:57
- FTP ASCII vs binary "image" - Japheth, 24.07.2010, 15:31
- FTP ASCII vs binary "image" - DOS386, 24.07.2010, 12:12
- FTP ASCII vs binary "image" - mbbrutman, 24.07.2010, 01:04
- mTCP DOS - NC documentation issue (design bug)? - mbbrutman, 20.07.2010, 19:32
- mTCP DOS - NC documentation issue (design bug)? - Arjay, 20.07.2010, 17:30
- mTCP DOS - NC documentation issue (design bug)? - mbbrutman, 20.07.2010, 15:22
- mTCP DOS TCP/IP apps for small machines - Japheth, 22.01.2010, 09:47
Mix view