Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -4,7 +4,7 @@
|
|||
HttpService = "/inet/tcp/8080/0/0"
|
||||
Hello = "<HTML><HEAD>" \
|
||||
"<TITLE>A Famous Greeting</TITLE></HEAD>" \
|
||||
"<BODY><H1>Hello, world</H1></BODY></HTML>"
|
||||
"<BODY><H1>Goodbye, World!</H1></BODY></HTML>"
|
||||
Len = length(Hello) + length(ORS)
|
||||
print "HTTP/1.0 200 OK" |& HttpService
|
||||
print "Content-Length: " Len ORS |& HttpService
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
with AWS; use AWS;
|
||||
with AWS.Response;
|
||||
with AWS.Server;
|
||||
with AWS.Status;
|
||||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
procedure HelloHTTP is
|
||||
function CB (Request : Status.Data) return Response.Data is
|
||||
pragma Unreferenced (Request);
|
||||
begin
|
||||
return Response.Build ("text/html", "Hello world!");
|
||||
end CB;
|
||||
TheServer : Server.HTTP;
|
||||
ch : Character;
|
||||
begin
|
||||
Server.Start (TheServer, "Rosettacode",
|
||||
Callback => CB'Unrestricted_Access, Port => 8080);
|
||||
Put_Line ("Press any key to quit."); Get_Immediate (ch);
|
||||
Server.Shutdown (TheServer);
|
||||
end HelloHTTP;
|
||||
|
|
@ -11,7 +11,7 @@ serve(dispatch w, file s, list colors)
|
|||
"<style>body { background-color: #111 }"
|
||||
"h1 { font-size:4cm; text-align: center; color: black;"
|
||||
" text-shadow: 0 0 2mm ", colors[drand(3)], "}</style></head>"
|
||||
"<body><h1>Goodbye, world!</h1></body></html>\n");
|
||||
"<body><h1>Goodbye, World!</h1></body></html>\n");
|
||||
|
||||
# chrome won't show the page if we close right away. we'll close in 2s.
|
||||
d.now;
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
TCPStartup()
|
||||
$socket = TCPListen("0.0.0.0",8080)
|
||||
$string = "Goodbye, World!"
|
||||
While 1
|
||||
Do
|
||||
$newConnection = TCPAccept($socket)
|
||||
Sleep(1)
|
||||
Until $newConnection <> -1
|
||||
$content = TCPRecv($newConnection, 2048)
|
||||
If StringLen($content) > 0 Then
|
||||
TCPSend($newConnection, Binary("HTTP/1.1 200 OK" & @CRLF))
|
||||
TCPSend($newConnection, Binary("Content-Type: text/html" & @CRLF))
|
||||
TCPSend($newConnection, Binary("Content-Length: "& BinaryLen($string) & @CRLF & @CRLF))
|
||||
TCPSend($newConnection, $string)
|
||||
EndIf
|
||||
TCPCloseSocket($newConnection)
|
||||
WEnd
|
||||
|
|
@ -42,8 +42,8 @@
|
|||
IF FN_writelinesocket(sock%(i%), "HTTP/1.0 200 OK")
|
||||
IF FN_writelinesocket(sock%(i%), "Content-type: text/html")
|
||||
IF FN_writelinesocket(sock%(i%), "")
|
||||
IF FN_writelinesocket(sock%(i%), "<html><head><title>Hello World!</title></head>")
|
||||
IF FN_writelinesocket(sock%(i%), "<body><h1>Hello World!</h1>")
|
||||
IF FN_writelinesocket(sock%(i%), "<html><head><title>Goodbye, World!</title></head>")
|
||||
IF FN_writelinesocket(sock%(i%), "<body><h1>Goodbye, World!</h1>")
|
||||
IF FN_writelinesocket(sock%(i%), "</body></html>")
|
||||
PROC_closesocket(sock%(i%))
|
||||
PRINT "Connection on socket " ; sock%(i%) " closed (local)"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
(list "HTTP/1.1 200 OK"
|
||||
"Content-Type: text/plain; charset=UTF-8"
|
||||
""
|
||||
"Hello world!"))
|
||||
"Goodbye, World!"))
|
||||
(socket-close ready)
|
||||
(setf connections (remove ready connections))))))
|
||||
(loop for c in connections do (loop while (socket-close c))))))
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ printf( 'Listening at port %1$d\n', port )
|
|||
|
||||
forever
|
||||
socket = listener.accept()
|
||||
PrintWriter( socket.getOutputStream(), true ).println( 'hello world' )
|
||||
PrintWriter( socket.getOutputStream(), true ).println( 'Goodbye, World!' )
|
||||
socket.shutdownOutput()
|
||||
socket.close()
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@ app req respond = respond $
|
|||
x -> index x
|
||||
|
||||
index x = responseBuilder status200 [("Content-Type", "text/plain")] $ mconcat $ map copyByteString
|
||||
[ "Hello World!\n" ]
|
||||
[ "Goodbye, world!\n" ]
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
print "hello world!"
|
||||
print "Goodbye, world!"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
8080.port.listen.say("Hello world!")
|
||||
8080.port.listen.say("Goodbye, World!")
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
|
|||
|
||||
class HelloHTTPRequestHandler(BaseHTTPRequestHandler):
|
||||
|
||||
message = 'Hello World! 今日は'
|
||||
message = 'Goodbye, world! 今日は'
|
||||
|
||||
def do_GET(self):
|
||||
self.send_response(200)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ library(httpuv)
|
|||
runServer("0.0.0.0", 5000,
|
||||
list(
|
||||
call = function(req) {
|
||||
list(status = 200L, headers = list('Content-Type' = 'text/html'), body = "Hello world!")
|
||||
list(status = 200L, headers = list('Content-Type' = 'text/html'), body = "Goodbye, world!")
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
html "Hello World!"
|
||||
html "Goodbye, world!"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ service := HTTPPluggableActionService new.
|
|||
service
|
||||
register:[:request |
|
||||
self halt: 'debugging'.
|
||||
request reply:'<HTML><BODY><H1>Hello World</H1></BODY></HTML>'
|
||||
request reply:'<HTML><BODY><H1>Goodbye, world!</H1></BODY></HTML>'
|
||||
]
|
||||
as:'hello'.
|
||||
service linkNames:#('/' ).
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
(ZnServer startDefaultOn: 1701)
|
||||
onRequestRespond: [ :request |
|
||||
ZnResponse ok: (ZnEntity text: 'Hello World!') ].
|
||||
ZnResponse ok: (ZnEntity text: 'Goodbye, World!') ].
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
val txt = Word8VectorSlice.full (Byte.stringToBytes "hello world!" ) ;
|
||||
val txt = Word8VectorSlice.full (Byte.stringToBytes "Goodbye, World!" ) ;
|
||||
|
||||
fun serve listener portnr =
|
||||
let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue