COMMODORE PLUS/4 WORLD
  Home  Search  Games  Tapes  Covers  Cheats  Maps  Software  New Stuff 
 Hall Of Fame  HVTC  Game Endings  Solutions  Remakes  Publications  Magazines  Effects  Top List 
 Members  Groups  Features  Plus/4 Encyclopedia  Hardware  Tools  Options  Forum 
Login
Back to forumReply To This TopicGo to last reply

Posted By

OldServers
on 2017-04-07
11:40:36
 C16 as a Web Server?

Hi,
You guys might be interested in our live Commodore 16 Web Server - It is an unmodified C16 connected to a Commodore Flyer modem and is hosting part of the OldServers website. The server software runs in BASIC and it seems pretty reliable so far. Have a look and let us know what you think:

http://oldservers.ddns.net:3032/

www.oldservers.net

Posted By

Csabo
on 2017-04-07
12:23:30
 Re: C16 as a Web Server?

It's pretty cool

The HTTP response doesn't seem to agree with Chrome, I can only view it in Firefox (and even then it doesn't render as HTML). Indeed as soon as I telnet into that IP/port, it immediately returns the HTML.

Will you make the server software available? We'd love to have it listed on the site.

Or how about some pictures? I think the folks here (me included!) would love to see the setup.

Posted By

OldServers
on 2017-04-07
12:48:17
 Re: C16 as a Web Server?

Thanks for the feedback.
That's strange that Chrome doesn't like it - I am testing it mainly on Chrome on Windows and Android here and it works OK for me, but I'll look into it. I did have some trouble with some of the links. I'll be refining it a bit over the next few weeks so it's work in progress really. I mainly wanted to get it up online and see how well it handles live requests.

Once I get the code stable and tested , you are welcome to have a copy of it no problem at all. My BASIC is a little rusty, but it is surprising what BASIC on a 30+ year old machine can do.

I have some pictures, I can't see an option to attach them in the forum - do I need to be a member?

Just to check, can you see if it works properly if you follow the link from my main site - http://www.oldservers.net
click on old servers and then the c16 picture and it should hopefully work from there.


Posted By

Baz
on 2017-04-07
13:14:21
 Re: C16 as a Web Server?

I'm in a pub in town right now using their free wifi. Just tried visiting via my iPad Air. Doesn't work in either Safari, Chrome or Dolphin. But then maybe it's just either an ios or wifi issue, although I suspect it's ios as the signal is pretty strong here.

Posted By

Csabo
on 2017-04-07
13:20:36
 Re: C16 as a Web Server?

You can test it via a number of free services, e.g. https://httpstatus.io/. It fails there as well.

It's the same thing if I follow the link via the main site.

Posted By

OldServers
on 2017-04-07
14:08:13
 Re: C16 as a Web Server?

It may be the port (3032) I am using is being blocked, especially on a public wifi, they might block a lot of non-standard ports on public wifi. The C16 server is logging quite a few connections so hopefully someone can confirm they have got a good connection.

I have tested it from a good few networks and so far no problems, but I'll look at changing the port number down to one much lower that may help. I've just added a bit more html formatting into it there too, that may smooth it out for some browsers.

Posted By

OldServers
on 2017-04-07
15:38:03
 Re: C16 as a Web Server?

The HTML is a bit ragged and some browsers don't seem to like it...

I have tested it in IE and Chrome on Win7 and Win8 and it is fine - I'm struggling to get it to work with a Mac and and iPad though, Apple seems to be a bit more particular about its HTML.

It is quite tricky to correctly format HTML in Commodore BASIC but I'll try to get it tidied up over the weekend and tested on the Mac and iPad. In the meantime can anyone let me know if they are able to connect? Either let me know through here or on twitter @ServersOld

I'll put a few more pictures up on www.oldservers.net

Thanks
Steve

Posted By

Mad
on 2017-04-07
15:45:49
 Re: C16 as a Web Server?

Genius production! I can access the site via Edge and everything is looking right with it. With chrome the site is for me not reachable. With Firefox I can see the documents source with all the meta tags instead of the final rendering of the text. However, didn't know this could be possible , great work! (Using windows 10 here)

Posted By

Csabo
on 2017-04-07
16:22:56
 Re: C16 as a Web Server?

I don't think the port block is the problem (could be, but not the main issue). Neither is the HTML.

The problem is that the HTTP response is missing. In the HTTP protocol, when the browser sends a GET request, the host should respond with:
HTTP/1.1 200 OK
(Headers...)
(Content...)

(Or, the host should respond with another appropriate code, if the request cannot be completed, like 403, 404, etc.)

I've immediately pointed this out in my first response to you: "Indeed as soon as I telnet into that IP/port, it immediately returns the HTML." - sorry if that wasn't clear enough.

Posted By

OldServers
on 2017-04-08
16:17:59
 Re: C16 as a Web Server?

Hi,
thanks for the advice - tried adding in the HTTP/1.1 200 OK response, but that then caused it to fail in Chrome for some reason...

However I have added a declaration at the start and tidied up some of the HTML which seems to have helped a lot. I have had a big response on Twitter and it has served over 1000 requests today alone so I'm pretty pleased with what the C16 has been able to do.

I'll keep working at the code until I get it right and then add the code. In the meantime I have a nice picture of it in operation here:
https://twitter.com/ServersOld

Posted By

Csabo
on 2017-04-08
21:34:30
 Re: C16 as a Web Server?

I'm glad you had a nice response - the idea has massive cool factor. I would guess that most people just took a cursory look (if they looked at all) and moved on. I on the other hand - I believe in doing things right, especially when it comes to C16 and Plus4 stuff

As it is, this is not done right. Sure, some clients will understand the response, but that's basically just a coincidence.

Here's what we see (Win10):



Let's keep at it a bit more. Responding with at least a single HTTP status code is a must. I've looked into what headers are necessary, and it looks like none of them. A cr/lf is precede the content though. Check here: https://www.tutorialspoint.com/http/http_responses.htm

I think that's all you were missing. Please give it a try, just 2 lines need to be added (one the status, and an empty one). Once you've added that, you could try https://httpstatus.io/ to see if it can retrieve the status. Send me an email (you can find the address by clicking my name) if you want to take this offline.

Posted By

Spektro
on 2017-04-09
06:29:33
 Re: C16 as a Web Server?

Oh, wow!

Posted By

MMS
on 2017-04-09
15:07:06
 Re: C16 as a Web Server?

Nice!
Maybe the code already modified, but it works perfectly with Win10+ Opera 43.0
(yeah, the browser, that rules them all )

Posted By

OldServers
on 2017-04-09
18:42:31
 Re: C16 as a Web Server?

It should be working properly on all browsers now. Big thanks to Csabo for all the help sorting this issue out

Posted By

bubis
on 2017-04-20
10:18:31
 Re: C16 as a Web Server?

What a crazy/cool idea!

Next step: uploading a .prg online and watching it running on live video.

I really need that, no kidding!

Posted By

OldServers
on 2017-04-21
15:57:47
 Re: C16 as a Web Server?

I'll add your idea to the list... my next project is to get an unexpanded 1k RAM ZX81 server online...but I'm not sure how that's going to go, I'm just assembling the parts for that atm...and I have a CBM PET that needs some attention too, but I like your idea
Follow me on twitter and I'll let you know how I'm getting on - @ServersOld
If anyone has any other ideas just let me know.

www.oldservers.net



Back to topReply To This Topic


Copyright © Plus/4 World Team, 2001-2017