db4
Slava Pestov 2008-05-14 06:08:57 -05:00
parent 8f96e40c1c
commit a190375c02
5 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: http.client checksums checksums.openssl splitting assocs
USING: checksums checksums.openssl splitting assocs
kernel io.files bootstrap.image sequences io namespaces
io.launcher math io.encodings.ascii ;
IN: bootstrap.image.upload

View File

@ -45,6 +45,7 @@ blah
[
TUPLE{ request
protocol: http
port: 80
method: "GET"
path: "/bar"
@ -84,6 +85,7 @@ Host: www.sex.com
[
TUPLE{ request
protocol: http
port: 80
method: "HEAD"
path: "/bar"

View File

@ -265,7 +265,7 @@ cookies ;
pick query>> set-at ;
: chop-hostname ( str -- str' )
":" split1 nip
":" split1 "//" ?head drop nip
CHAR: / over index over length or tail
dup empty? [ drop "/" ] when ;
@ -440,7 +440,7 @@ M: https protocol-addr
dup host>> [
[ protocol>> protocol>string write "://" write ]
[ host>> url-encode write ":" write ]
[ port>> number>string write ]
[ [ port>> ] [ protocol>> http-port or ] bi number>string write ]
tri
] [ drop ] if
]

View File

@ -6,6 +6,7 @@ IN: http.server.tests
[
<request>
http >>protocol
"www.apple.com" >>host
"/xxx/bar" >>path
{ { "a" "b" } } >>query

View File

@ -6,6 +6,6 @@ IN: io.unix.files.unique
{ O_RDWR O_CREAT O_EXCL } flags ;
M: unix (make-unique-file) ( path -- )
open-unique-flags file-mode open dup io-error close ;
open-unique-flags file-mode open-file close-file ;
M: unix temporary-path ( -- path ) "/tmp" ;