Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117759428
D1090.1775211317.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1020 B
Referenced Files
None
Subscribers
None
D1090.1775211317.diff
View Options
diff --git a/apps/kolab_guam/src/kolab_guam_session.erl b/apps/kolab_guam/src/kolab_guam_session.erl
--- a/apps/kolab_guam/src/kolab_guam_session.erl
+++ b/apps/kolab_guam/src/kolab_guam_session.erl
@@ -238,17 +238,14 @@
preprocess_client_data(undefined, Data, #state{ buffered_client_data = Buffered }) ->
<<Buffered/binary, Data/binary>>;
preprocess_client_data(Z, Data, #state{ buffered_client_data = Buffered }) ->
- Inflated = joined(zlib:inflate(Z, Data), <<>>),
+ Inflated = iolist_to_binary(zlib:inflate(Z, Data)),
<<Buffered/binary, Inflated/binary>>.
postprocess_server_data(undefined, Data) ->
%% we aren't compressing so there is nothing to do
Data;
postprocess_server_data(Z, Data) ->
- joined(zlib:deflate(Z, Data, sync), <<>>).
-
-joined([], Binary) -> Binary;
-joined([H|Rest], Binary) -> joined(Rest, <<Binary/binary, H/binary>>).
+ iolist_to_binary(zlib:deflate(Z, Data, sync)).
init_rules(RuleConfig) -> init_rule(RuleConfig, []).
init_rule([], Acc) -> Acc;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 10:15 AM (1 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823621
Default Alt Text
D1090.1775211317.diff (1020 B)
Attached To
Mode
D1090: Instead of converting the values from zlib:deflate to binary by hand we can use the iolist_to_binary() function from erlang; this allows us to convert also nested iolists.
Attached
Detach File
Event Timeline