Fixes
parent
8f96e40c1c
commit
a190375c02
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
]
|
||||
|
|
|
@ -6,6 +6,7 @@ IN: http.server.tests
|
|||
|
||||
[
|
||||
<request>
|
||||
http >>protocol
|
||||
"www.apple.com" >>host
|
||||
"/xxx/bar" >>path
|
||||
{ { "a" "b" } } >>query
|
||||
|
|
|
@ -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" ;
|
||||
|
|
Loading…
Reference in New Issue