diff options
author | Lukas Larsson <lukas@erlang-solutions.com> | 2011-11-29 11:05:37 +0100 |
---|---|---|
committer | Lukas Larsson <lukas@erlang-solutions.com> | 2011-12-02 10:39:38 +0100 |
commit | 1bbf8cee44b8836d66d289cc0b5b314ed83de821 (patch) | |
tree | 6d7ab44fd0d11c33f885816ddb12dfbc785f4540 /lib/kernel/test | |
parent | 27faa34693f35b6aa41fa67cbfe365bd082a5757 (diff) | |
download | otp-1bbf8cee44b8836d66d289cc0b5b314ed83de821.tar.gz otp-1bbf8cee44b8836d66d289cc0b5b314ed83de821.tar.bz2 otp-1bbf8cee44b8836d66d289cc0b5b314ed83de821.zip |
Remove header/trailer support
Since the API for headers/trailers seem to be very awkward to
work with when using non-blocking io the feature is dropped
for now. See unix_efile.c for more details.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r-- | lib/kernel/test/sendfile_SUITE.erl | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl index cddb783fe7..5312508918 100644 --- a/lib/kernel/test/sendfile_SUITE.erl +++ b/lib/kernel/test/sendfile_SUITE.erl @@ -27,7 +27,6 @@ all() -> [t_sendfile_small ,t_sendfile_big -% ,t_sendfile_hdtl ,t_sendfile_partial ,t_sendfile_offset ,t_sendfile_sendafter @@ -130,47 +129,6 @@ t_sendfile_offset(Config) -> ok = sendfile_send(Send). -t_sendfile_hdtl(Config) -> - Filename = proplists:get_value(small_file, Config), - FileOpts = proplists:get_value(file_opts, Config, []), - - Send = fun(Sock, Headers, Trailers, HdtlSize) -> - {Size, Data} = sendfile_file_info(Filename), - {ok,D} = file:open(Filename,[read|FileOpts]), - AllSize = Size+HdtlSize, - {ok, AllSize} = file:sendfile( - D, Sock,0,0, - [{headers,Headers}, - {trailers,Trailers}]), - file:close(D), - Data - end, - - SendHdTl = fun(Sock) -> - Headers = [<<"header1">>,<<0:(1024*8)>>,"header2"], - Trailers = [<<"trailer1">>,"trailer2"], - D = Send(Sock,Headers,Trailers, - iolist_size([Headers,Trailers])), - iolist_to_binary([Headers,D,Trailers]) - end, - ok = sendfile_send(SendHdTl), - - SendHd = fun(Sock) -> - Headers = [<<"header1">>,"header2"], - D = Send(Sock,Headers,undefined, - iolist_size([Headers])), - iolist_to_binary([Headers,D]) - end, - ok = sendfile_send(SendHd), - - SendTl = fun(Sock) -> - Trailers = [<<"trailer1">>,"trailer2"], - D = Send(Sock,undefined,Trailers, - iolist_size([Trailers])), - iolist_to_binary([D,Trailers]) - end, - ok = sendfile_send(SendTl). - t_sendfile_sendafter(Config) -> Filename = proplists:get_value(small_file, Config), |