@@ -135,7 +135,7 @@ handle('GET', [<<"decoded-list">>], Req) ->
135
135
handle ('GET' , [<<" sendfile" >>], _Req ) ->
136
136
% % Returning {file, "/path/to/file"} instead of the body results
137
137
% % in Elli using sendfile.
138
- F = " README.md" ,
138
+ F = filename : join ( code : priv_dir ( elli ), " README.md" ) ,
139
139
{ok , [], {file , F }};
140
140
141
141
handle ('GET' , [<<" send_no_file" >>], _Req ) ->
@@ -145,14 +145,14 @@ handle('GET', [<<"send_no_file">>], _Req) ->
145
145
{ok , [], {file , F }};
146
146
147
147
handle ('GET' , [<<" sendfile" >>, <<" error" >>], _Req ) ->
148
- F = " test " ,
148
+ F = code : priv_dir ( elli ) ,
149
149
{ok , [], {file , F }};
150
150
151
151
handle ('GET' , [<<" sendfile" >>, <<" range" >>], Req ) ->
152
152
% % Read the Range header of the request and use the normalized
153
153
% % range with sendfile, otherwise send the entire file when
154
154
% % no range is present, or respond with a 416 if the range is invalid.
155
- F = " README.md" ,
155
+ F = filename : join ( code : priv_dir ( elli ), " README.md" ) ,
156
156
{ok , [], {file , F , elli_request :get_range (Req )}};
157
157
158
158
handle ('GET' , [<<" compressed" >>], _Req ) ->
0 commit comments