diff --git a/extra/http/http-tests.factor b/extra/http/http-tests.factor index 6f2171a956..81ada558f3 100755 --- a/extra/http/http-tests.factor +++ b/extra/http/http-tests.factor @@ -1,5 +1,6 @@ USING: http tools.test multiline tuple-syntax -io.streams.string io.encodings.utf8 kernel arrays splitting sequences +io.streams.string io.encodings.utf8 io.encodings.string +kernel arrays splitting sequences assocs io.sockets db db.sqlite continuations urls hashtables ; IN: http.tests @@ -160,7 +161,7 @@ test-db [ [ t ] [ "resource:extra/http/test/foo.html" ascii file-contents - "http://localhost:1237/nested/foo.html" http-get nip = + "http://localhost:1237/nested/foo.html" http-get nip ascii decode = ] unit-test [ "http://localhost:1237/redirect-loop" http-get nip ] diff --git a/extra/io/streams/limited/limited.factor b/extra/io/streams/limited/limited.factor index 1c6a172e97..669240d28b 100644 --- a/extra/io/streams/limited/limited.factor +++ b/extra/io/streams/limited/limited.factor @@ -6,14 +6,14 @@ IN: io.streams.limited TUPLE: limited-stream stream count limit ; -: ( limit stream -- stream' ) +: ( stream limit -- stream' ) limited-stream new - swap >>stream swap >>limit + swap >>stream 0 >>count ; : limit-input ( limit -- ) - input-stream [ ] change ; + input-stream [ swap ] change ; ERROR: limit-exceeded ;