Fix http tests and io.server.connection docs

db4
Doug Coleman 2010-09-19 15:47:25 -05:00
parent aa8c12a84b
commit 87ec88ff6c
3 changed files with 5 additions and 5 deletions

View File

@ -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 ;
[ ] [

View File

@ -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." } ;

View File

@ -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 ;