gopher: fix gopher urls to include the type character properly.
parent
4dbc377383
commit
77d8475228
|
@ -40,12 +40,9 @@ CONSTANT: A_PLUS_MOVIE CHAR: ;
|
||||||
CONSTANT: A_PLUS_SOUND CHAR: <
|
CONSTANT: A_PLUS_SOUND CHAR: <
|
||||||
|
|
||||||
: gopher-get ( selector -- item-type byte-array )
|
: gopher-get ( selector -- item-type byte-array )
|
||||||
"/" split1 "" or
|
"/" split1 "" or [ first ] dip
|
||||||
[ dup length 1 > [ string>number ] [ first ] if ]
|
"?" split1 [ "\t" glue ] when*
|
||||||
[
|
"\r\n" append utf8 encode write flush contents ;
|
||||||
"?" split1 [ "\t" glue ] when*
|
|
||||||
"\r\n" append utf8 encode write flush contents
|
|
||||||
] bi* ;
|
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
|
@ -78,7 +75,7 @@ M: gopher-link >url
|
||||||
] [
|
] [
|
||||||
{
|
{
|
||||||
[ host>> ] [ port>> ] [ type>> ] [ selector>> ]
|
[ host>> ] [ port>> ] [ type>> ] [ selector>> ]
|
||||||
} cleave "gopher://%s:%s/%s%s" sprintf
|
} cleave "gopher://%s:%s/%c%s" sprintf
|
||||||
] if >url ;
|
] if >url ;
|
||||||
|
|
||||||
: gopher-link. ( gopher-link -- )
|
: gopher-link. ( gopher-link -- )
|
||||||
|
|
Loading…
Reference in New Issue