unicorn 4.6.1 → 4.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/GIT-VERSION-GEN +1 -1
- data/ext/unicorn_http/ext_help.h +0 -4
- data/ext/unicorn_http/httpdate.c +5 -9
- metadata +2 -2
data/GIT-VERSION-GEN
CHANGED
data/ext/unicorn_http/ext_help.h
CHANGED
@@ -52,10 +52,6 @@ static void rb_18_str_set_len(VALUE str, long len)
|
|
52
52
|
# endif
|
53
53
|
#endif /* ! defined(NUM2SIZET) */
|
54
54
|
|
55
|
-
#ifndef HAVE_RB_STR_MODIFY
|
56
|
-
# define rb_str_modify(x) do {} while (0)
|
57
|
-
#endif /* ! defined(HAVE_RB_STR_MODIFY) */
|
58
|
-
|
59
55
|
static inline int str_cstr_eq(VALUE val, const char *ptr, long len)
|
60
56
|
{
|
61
57
|
return (RSTRING_LEN(val) == len && !memcmp(ptr, RSTRING_PTR(val), len));
|
data/ext/unicorn_http/httpdate.c
CHANGED
@@ -5,13 +5,9 @@
|
|
5
5
|
static const size_t buf_capa = sizeof("Thu, 01 Jan 1970 00:00:00 GMT");
|
6
6
|
static VALUE buf;
|
7
7
|
static char *buf_ptr;
|
8
|
-
static const char
|
9
|
-
|
10
|
-
|
11
|
-
static const char *const months[] = {
|
12
|
-
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
|
13
|
-
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
|
14
|
-
};
|
8
|
+
static const char week[] = "Sun\0Mon\0Tue\0Wed\0Thu\0Fri\0Sat";
|
9
|
+
static const char months[] = "Jan\0Feb\0Mar\0Apr\0May\0Jun\0"
|
10
|
+
"Jul\0Aug\0Sep\0Oct\0Nov\0Dec";
|
15
11
|
|
16
12
|
/* for people on wonky systems only */
|
17
13
|
#ifndef HAVE_GMTIME_R
|
@@ -57,9 +53,9 @@ static VALUE httpdate(VALUE self)
|
|
57
53
|
/* we can make this thread-safe later if our Ruby loses the GVL */
|
58
54
|
snprintf(buf_ptr, buf_capa,
|
59
55
|
"%s, %02d %s %4d %02d:%02d:%02d GMT",
|
60
|
-
week
|
56
|
+
week + (tm.tm_wday * 4),
|
61
57
|
tm.tm_mday,
|
62
|
-
months
|
58
|
+
months + (tm.tm_mon * 4),
|
63
59
|
tm.tm_year + 1900,
|
64
60
|
tm.tm_hour,
|
65
61
|
tm.tm_min,
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: !binary |-
|
3
3
|
dW5pY29ybg==
|
4
4
|
version: !ruby/object:Gem::Version
|
5
|
-
version: 4.6.
|
5
|
+
version: 4.6.2
|
6
6
|
prerelease:
|
7
7
|
platform: ruby
|
8
8
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: !binary |-
|