unicorn 5.5.0.pre1 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/GIT-VERSION-GEN +1 -1
- data/Links +3 -1
- data/ext/unicorn_http/common_field_optimization.h +2 -2
- data/ext/unicorn_http/global_variables.h +2 -2
- data/ext/unicorn_http/httpdate.c +2 -2
- data/ext/unicorn_http/unicorn_http.rl +4 -9
- data/unicorn.gemspec +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c37db62d1e413297803b2fac9be18b752b80b0068eeeafd1027eb2eae2a693c2
|
4
|
+
data.tar.gz: 0af88fc316857d8e0c4bc899de3d7994f54a01e5a9a8a25ad5a721cc669d6bf9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5788c3a37e65de0dbc12735f72af22a27638ada89f05c3e2904171662fd72ba3ef42d01efd3aa3bd8c3324a90c2b3b11fbd27835b7c8f32969b923a66dae9e65
|
7
|
+
data.tar.gz: 19928922c0e6068b4818d2111f9f0e47ffe071c22c68deb23c67a29c787c9e0f5e1e17d503c56b2e01f885aa9329ca04e5e7829ccf28e3d7cec14907f9b20736
|
data/GIT-VERSION-GEN
CHANGED
data/Links
CHANGED
@@ -50,7 +50,9 @@ or services behind them.
|
|
50
50
|
=== Prior Work
|
51
51
|
|
52
52
|
* {Mongrel}[https://rubygems.org/gems/mongrel] - the awesome webserver
|
53
|
-
unicorn is based on
|
53
|
+
unicorn is based on. A historical archive of the mongrel dev list
|
54
|
+
featuring early discussions of unicorn is available at:
|
55
|
+
https://bogomips.org/mongrel-devel/
|
54
56
|
|
55
57
|
* {david}[https://bogomips.org/david.git] - a tool to explain why you need
|
56
58
|
nginx in front of unicorn
|
@@ -77,7 +77,7 @@ static VALUE str_new_dd_freeze(const char *ptr, long len)
|
|
77
77
|
}
|
78
78
|
|
79
79
|
/* this function is not performance-critical, called only at load time */
|
80
|
-
static void init_common_fields(
|
80
|
+
static void init_common_fields(void)
|
81
81
|
{
|
82
82
|
int i;
|
83
83
|
struct common_field *cf = common_http_fields;
|
@@ -95,7 +95,7 @@ static void init_common_fields(VALUE mark_ary)
|
|
95
95
|
memcpy(tmp + HTTP_PREFIX_LEN, cf->name, cf->len + 1);
|
96
96
|
cf->value = str_new_dd_freeze(tmp, HTTP_PREFIX_LEN + cf->len);
|
97
97
|
}
|
98
|
-
|
98
|
+
rb_gc_register_mark_object(cf->value);
|
99
99
|
}
|
100
100
|
}
|
101
101
|
|
@@ -56,7 +56,7 @@ NORETURN(static void parser_raise(VALUE klass, const char *));
|
|
56
56
|
/** Defines global strings in the init method. */
|
57
57
|
#define DEF_GLOBAL(N, val) do { \
|
58
58
|
g_##N = rb_obj_freeze(rb_str_new(val, sizeof(val) - 1)); \
|
59
|
-
|
59
|
+
rb_gc_register_mark_object(g_##N); \
|
60
60
|
} while (0)
|
61
61
|
|
62
62
|
/* Defines the maximum allowed lengths for various input elements.*/
|
@@ -67,7 +67,7 @@ DEF_MAX_LENGTH(FRAGMENT, 1024); /* Don't know if this length is specified somewh
|
|
67
67
|
DEF_MAX_LENGTH(REQUEST_PATH, 4096); /* common PATH_MAX on modern systems */
|
68
68
|
DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));
|
69
69
|
|
70
|
-
static void init_globals(
|
70
|
+
static void init_globals(void)
|
71
71
|
{
|
72
72
|
DEF_GLOBAL(rack_url_scheme, "rack.url_scheme");
|
73
73
|
DEF_GLOBAL(request_method, "REQUEST_METHOD");
|
data/ext/unicorn_http/httpdate.c
CHANGED
@@ -64,13 +64,13 @@ static VALUE httpdate(VALUE self)
|
|
64
64
|
return buf;
|
65
65
|
}
|
66
66
|
|
67
|
-
void init_unicorn_httpdate(
|
67
|
+
void init_unicorn_httpdate(void)
|
68
68
|
{
|
69
69
|
VALUE mod = rb_define_module("Unicorn");
|
70
70
|
mod = rb_define_module_under(mod, "HttpResponse");
|
71
71
|
|
72
72
|
buf = rb_str_new(0, buf_capa - 1);
|
73
|
-
|
73
|
+
rb_gc_register_mark_object(buf);
|
74
74
|
buf_ptr = RSTRING_PTR(buf);
|
75
75
|
httpdate(Qnil);
|
76
76
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
#include "global_variables.h"
|
14
14
|
#include "c_util.h"
|
15
15
|
|
16
|
-
void init_unicorn_httpdate(
|
16
|
+
void init_unicorn_httpdate(void);
|
17
17
|
|
18
18
|
#define UH_FL_CHUNKED 0x1
|
19
19
|
#define UH_FL_HASBODY 0x2
|
@@ -931,11 +931,8 @@ static VALUE HttpParser_rssget(VALUE self)
|
|
931
931
|
|
932
932
|
void Init_unicorn_http(void)
|
933
933
|
{
|
934
|
-
static VALUE mark_ary;
|
935
934
|
VALUE mUnicorn, cHttpParser;
|
936
935
|
|
937
|
-
mark_ary = rb_ary_new();
|
938
|
-
rb_global_variable(&mark_ary);
|
939
936
|
mUnicorn = rb_define_module("Unicorn");
|
940
937
|
cHttpParser = rb_define_class_under(mUnicorn, "HttpParser", rb_cObject);
|
941
938
|
eHttpParserError =
|
@@ -945,7 +942,7 @@ void Init_unicorn_http(void)
|
|
945
942
|
e414 = rb_define_class_under(mUnicorn, "RequestURITooLongError",
|
946
943
|
eHttpParserError);
|
947
944
|
|
948
|
-
init_globals(
|
945
|
+
init_globals();
|
949
946
|
rb_define_alloc_func(cHttpParser, HttpParser_alloc);
|
950
947
|
rb_define_method(cHttpParser, "initialize", HttpParser_init, 0);
|
951
948
|
rb_define_method(cHttpParser, "clear", HttpParser_clear, 0);
|
@@ -982,16 +979,14 @@ void Init_unicorn_http(void)
|
|
982
979
|
|
983
980
|
rb_define_singleton_method(cHttpParser, "max_header_len=", set_maxhdrlen, 1);
|
984
981
|
|
985
|
-
init_common_fields(
|
982
|
+
init_common_fields();
|
986
983
|
SET_GLOBAL(g_http_host, "HOST");
|
987
984
|
SET_GLOBAL(g_http_trailer, "TRAILER");
|
988
985
|
SET_GLOBAL(g_http_transfer_encoding, "TRANSFER_ENCODING");
|
989
986
|
SET_GLOBAL(g_content_length, "CONTENT_LENGTH");
|
990
987
|
SET_GLOBAL(g_http_connection, "CONNECTION");
|
991
988
|
id_set_backtrace = rb_intern("set_backtrace");
|
992
|
-
init_unicorn_httpdate(
|
993
|
-
|
994
|
-
OBJ_FREEZE(mark_ary);
|
989
|
+
init_unicorn_httpdate();
|
995
990
|
|
996
991
|
#ifndef HAVE_RB_HASH_CLEAR
|
997
992
|
id_clear = rb_intern("clear");
|
data/unicorn.gemspec
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
Gem::Specification.new do |s|
|
13
13
|
s.name = %q{unicorn}
|
14
|
-
s.version = (ENV['VERSION'] || '5.5.0
|
14
|
+
s.version = (ENV['VERSION'] || '5.5.0').dup
|
15
15
|
s.authors = ['unicorn hackers']
|
16
16
|
s.summary = 'Rack HTTP server for fast clients and Unix'
|
17
17
|
s.description = File.read('README').split("\n\n")[1]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.0
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- unicorn hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -285,12 +285,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
285
285
|
version: '3.0'
|
286
286
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
287
287
|
requirements:
|
288
|
-
- - "
|
288
|
+
- - ">="
|
289
289
|
- !ruby/object:Gem::Version
|
290
|
-
version:
|
290
|
+
version: '0'
|
291
291
|
requirements: []
|
292
|
-
|
293
|
-
rubygems_version: 2.7.7
|
292
|
+
rubygems_version: 3.0.2
|
294
293
|
signing_key:
|
295
294
|
specification_version: 4
|
296
295
|
summary: Rack HTTP server for fast clients and Unix
|