iodine 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of iodine might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/ext/iodine/http_response.c +6 -3
- data/ext/iodine/iodine_http.c +2 -1
- data/lib/iodine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f2f657fb4dfe53dba0db85aa2b84685287e0d1e
|
4
|
+
data.tar.gz: '04085f50a4e1dcb50f960ea32a62717aed58b77c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e464440c9fdaf6dba8ca6ae60e7d29d7d90cd6a3a31557573b558296ded54b83d373542777697e0b41cdde863d6131b73bbd8a9da9ca7d9f1b8a6a738ff66dc8
|
7
|
+
data.tar.gz: a2a1e275c0754427e4f6efce6e1111976d9fb87a1c4710dd2be5d46627f3ee6476de8b7fa82e134a039ce50454bd981ba36aa96bd76dc69a9d8ba36852648af1
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ Please notice that this change log contains changes for upcoming releases as wel
|
|
6
6
|
|
7
7
|
## Changes:
|
8
8
|
|
9
|
+
#### Change log v.0.4.5
|
10
|
+
|
11
|
+
**Fix**: fix static file service for `X-Sendfile` as well as static error file fallback pages (404.html etc').
|
12
|
+
|
9
13
|
***
|
10
14
|
|
11
15
|
#### Change log v.0.4.4
|
data/ext/iodine/http_response.c
CHANGED
@@ -234,10 +234,11 @@ int http_response_sendfile2(http_response_s *response, http_request_s *request,
|
|
234
234
|
if (file_path_safe && path_safe_len == 0)
|
235
235
|
path_safe_len = strlen(file_path_safe);
|
236
236
|
|
237
|
-
if (file_path_unsafe && path_unsafe_len == 0)
|
237
|
+
if (file_path_unsafe && path_unsafe_len == 0) {
|
238
238
|
path_unsafe_len = strlen(file_path_unsafe);
|
239
|
-
|
240
|
-
|
239
|
+
if (!path_unsafe_len)
|
240
|
+
return -1;
|
241
|
+
}
|
241
242
|
|
242
243
|
const char *mime = NULL;
|
243
244
|
const char *ext = NULL;
|
@@ -257,6 +258,8 @@ int http_response_sendfile2(http_response_s *response, http_request_s *request,
|
|
257
258
|
if (file_path_unsafe) {
|
258
259
|
if (fname[path_safe_len - 1] == '/' && file_path_unsafe[0] == '/')
|
259
260
|
path_safe_len--;
|
261
|
+
else if (fname[path_safe_len - 1] != '/' && file_path_unsafe[0] != '/')
|
262
|
+
fname[path_safe_len++] = '/';
|
260
263
|
ssize_t tmp = http_decode_path(fname + path_safe_len, file_path_unsafe,
|
261
264
|
path_unsafe_len);
|
262
265
|
if (tmp < 0)
|
data/ext/iodine/iodine_http.c
CHANGED
@@ -412,7 +412,8 @@ static void *on_rack_request_in_GVL(http_request_s *request) {
|
|
412
412
|
// X-Sendfile support only present when iodine sercers static files.
|
413
413
|
VALUE xfiles;
|
414
414
|
if (request->settings->public_folder &&
|
415
|
-
(xfiles = rb_hash_aref(response_headers, XSENDFILE)) != Qnil
|
415
|
+
(xfiles = rb_hash_aref(response_headers, XSENDFILE)) != Qnil &&
|
416
|
+
TYPE(xfiles) == T_STRING) {
|
416
417
|
int fr = 0;
|
417
418
|
if (OBJ_FROZEN(response_headers)) {
|
418
419
|
response_headers = rb_hash_dup(response_headers);
|
data/lib/iodine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iodine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boaz Segev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|