From 87ec88ff6c0f54f721d2217598600a17f2dce1ed Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 19 Sep 2010 15:47:25 -0500 Subject: [PATCH] Fix http tests and io.server.connection docs --- basis/http/http-tests.factor | 4 ++-- basis/io/servers/connection/connection-docs.factor | 4 ++-- basis/tools/deploy/deploy-tests.factor | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/http/http-tests.factor b/basis/http/http-tests.factor index a48c1ec48d..7be7c43399 100644 --- a/basis/http/http-tests.factor +++ b/basis/http/http-tests.factor @@ -3,7 +3,7 @@ multiline io.streams.string io.encodings.utf8 io.encodings.8-bit io.encodings.binary io.encodings.string io.encodings.ascii kernel arrays splitting sequences assocs io.sockets db db.sqlite continuations urls hashtables accessors namespaces xml.data -io.encodings.8-bit.latin1 ; +io.encodings.8-bit.latin1 random ; IN: http.tests [ "text/plain" "UTF-8" ] [ "text/plain" parse-content-type ] unit-test @@ -232,7 +232,7 @@ test-db [ 0 >>insecure f >>secure start-server - sockets>> first addr>> port>> + servers>> random addr>> port>> ] with-scope "port" set ; [ ] [ diff --git a/basis/io/servers/connection/connection-docs.factor b/basis/io/servers/connection/connection-docs.factor index 73225c407f..4dd8efdbe3 100644 --- a/basis/io/servers/connection/connection-docs.factor +++ b/basis/io/servers/connection/connection-docs.factor @@ -126,11 +126,11 @@ HELP: with-threaded-server { $description "Runs a server and calls a quotation, stopping the server once the quotation returns." } ; HELP: secure-port -{ $values { "n" { $maybe integer } } } +{ $values { "n/f" { $maybe integer } } } { $description "Outputs one of the port numbers on which the current threaded server accepts secure socket connections. Outputs " { $link f } " if the current threaded server does not accept secure socket connections." } { $notes "Can only be used from the dynamic scope of a " { $link handle-client* } " call." } ; HELP: insecure-port -{ $values { "n" { $maybe integer } } } +{ $values { "n/f" { $maybe integer } } } { $description "Outputs one of the port numbers on which the current threaded server accepts ordinary socket connections. Outputs " { $link f } " if the current threaded server does not accept ordinary socket connections." } { $notes "Can only be used from the dynamic scope of a " { $link handle-client* } " call." } ; diff --git a/basis/tools/deploy/deploy-tests.factor b/basis/tools/deploy/deploy-tests.factor index d36a855842..fa446ad44c 100644 --- a/basis/tools/deploy/deploy-tests.factor +++ b/basis/tools/deploy/deploy-tests.factor @@ -69,7 +69,7 @@ M: quit-responder call-responder* 0 >>insecure f >>secure start-server - sockets>> first addr>> port>> + servers>> first addr>> port>> dup number>string "resource:temp/port-number" ascii set-file-contents ] with-scope "port" set ;