Skip to content

Commit c311d77

Browse files
committed
REVERT: It is not a good idea to handle file input not as binary.
1 parent 494ea18 commit c311d77

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

http_multipart_plugin.pl

+3-2
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,12 @@
202202
mime_properties(Params, Properties),
203203
read_string(Stream, _, String),
204204
atom_string(Atom, String).
205-
part_value(Stream, Name, Params, Encoding, Name=Value, Options) :-
205+
part_value(Stream, Name, Params, _Encoding, Name=Value, Options) :-
206206
memberchk(filename(_), Params),
207207
option(on_filename(Goal), Options),
208208
!,
209-
set_encoding(Encoding, Stream, Options),
209+
% Always save files binary
210+
% set_encoding(Encoding, Stream, Options),
210211
call(Goal, Stream, Value, [name(Name)|Params]).
211212
part_value(Stream, Name, _, Encoding, Name=Value, Options) :-
212213
set_encoding(Encoding, Stream, Options),

0 commit comments

Comments
 (0)