waitress-core 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/LICENSE +21 -21
- data/Rakefile +13 -13
- data/bin/waitress +22 -22
- data/ext/Thanks.md +1 -1
- data/ext/waitress_http11/ext_help.h +15 -15
- data/ext/waitress_http11/extconf.rb +6 -6
- data/ext/waitress_http11/http11.c +532 -532
- data/ext/waitress_http11/http11_parser.c +1216 -1216
- data/ext/waitress_http11/http11_parser.h +49 -49
- data/ext/waitress_http11/http11_parser.java.rl +171 -171
- data/ext/waitress_http11/http11_parser.rl +165 -165
- data/ext/waitress_http11/http11_parser_common.rl +55 -55
- data/ext/waitress_http11/http11_wrb_parser.h +91 -91
- data/lib/waitress/chef.rb +113 -113
- data/lib/waitress/configure.rb +121 -121
- data/lib/waitress/evalbind.rb +9 -9
- data/lib/waitress/handlers/dirhandler.rb +39 -39
- data/lib/waitress/handlers/handler.rb +57 -57
- data/lib/waitress/handlers/handler404.rb +25 -25
- data/lib/waitress/handlers/libhandler.rb +58 -58
- data/lib/waitress/kernel.rb +182 -182
- data/lib/waitress/parse/query.rb +60 -60
- data/lib/waitress/request.rb +45 -45
- data/lib/waitress/resources/default_config.rb +52 -52
- data/lib/waitress/resources/http/404.html +18 -18
- data/lib/waitress/resources/http/css/hack.css +37 -37
- data/lib/waitress/resources/http/css/waitress.css +57 -57
- data/lib/waitress/resources/http/fonts/svg/latin/hack-bold-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/fonts/svg/latin/hack-bolditalic-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/fonts/svg/latin/hack-italic-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/fonts/svg/latin/hack-regular-latin-webfont.svg +240 -240
- data/lib/waitress/resources/http/index.html +15 -15
- data/lib/waitress/response.rb +105 -105
- data/lib/waitress/server.rb +160 -161
- data/lib/waitress/util.rb +707 -707
- data/lib/waitress/version.rb +3 -3
- data/lib/waitress/vhost.rb +217 -217
- data/lib/waitress.rb +99 -106
- data/lib/waitress_http11.bundle +0 -0
- data/waitress-core.gemspec +29 -29
- metadata +4 -4
- data/lib/waitress_http11.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f2df476e9af2dc3f9b978c075e4e9692b0252ee
|
4
|
+
data.tar.gz: db4607789c360eb881d5311f3b5fe7604dec348a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfb19a5cbc11798f5b3b0bd15e84623d364612fa0aa9cbd5489c53a0c2b473fc86d868913aa50383a9dcbd4c17ccbb38f946730bec582d2b2967d69d6878fe67
|
7
|
+
data.tar.gz: de2bc24877d18daaff2c9bacc8215a58b6b14a58de4ff27aeaa3691fb28a7fa3694ea21989bd89f3600385600d3e7e1b66e3dded4d68d5760b885d182849b75e
|
data/Gemfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://rubygems.org'
|
2
|
-
|
3
|
-
# Specify your gem's dependencies in waitress-core.gemspec
|
4
|
-
gemspec
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in waitress-core.gemspec
|
4
|
+
gemspec
|
data/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015 Jaci R Brunning
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Jaci R Brunning
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
require 'rake/extensiontask'
|
2
|
-
require 'rake/testtask'
|
3
|
-
|
4
|
-
spec = Gem::Specification.load('waitress-core.gemspec')
|
5
|
-
Rake::ExtensionTask.new('waitress_http11', spec)
|
6
|
-
|
7
|
-
task default: %w[test]
|
8
|
-
|
9
|
-
Rake::TestTask.new do |t|
|
10
|
-
t.libs << "test"
|
11
|
-
t.test_files = FileList['test/unit.rb']
|
12
|
-
t.verbose = true
|
13
|
-
end
|
1
|
+
require 'rake/extensiontask'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
spec = Gem::Specification.load('waitress-core.gemspec')
|
5
|
+
Rake::ExtensionTask.new('waitress_http11', spec)
|
6
|
+
|
7
|
+
task default: %w[test]
|
8
|
+
|
9
|
+
Rake::TestTask.new do |t|
|
10
|
+
t.libs << "test"
|
11
|
+
t.test_files = FileList['test/unit.rb']
|
12
|
+
t.verbose = true
|
13
|
+
end
|
data/bin/waitress
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "waitress"
|
4
|
-
require "optparse"
|
5
|
-
|
6
|
-
trap("INT") { exit }
|
7
|
-
|
8
|
-
conf = nil
|
9
|
-
|
10
|
-
@options = {}
|
11
|
-
|
12
|
-
OptionParser.new do |o|
|
13
|
-
o.on("-h", "--home HOME_DIR", "Change the home directory for Waitress (default: ~/.waitress)") { |x| @options[:home] = x }
|
14
|
-
end.parse!
|
15
|
-
|
16
|
-
if @options.include? :home
|
17
|
-
@conf = Waitress.serve! true, @options[:home]
|
18
|
-
else
|
19
|
-
@conf = Waitress.serve! true
|
20
|
-
end
|
21
|
-
@conf.run
|
22
|
-
@conf.join
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "waitress"
|
4
|
+
require "optparse"
|
5
|
+
|
6
|
+
trap("INT") { exit }
|
7
|
+
|
8
|
+
conf = nil
|
9
|
+
|
10
|
+
@options = {}
|
11
|
+
|
12
|
+
OptionParser.new do |o|
|
13
|
+
o.on("-h", "--home HOME_DIR", "Change the home directory for Waitress (default: ~/.waitress)") { |x| @options[:home] = x }
|
14
|
+
end.parse!
|
15
|
+
|
16
|
+
if @options.include? :home
|
17
|
+
@conf = Waitress.serve! true, @options[:home]
|
18
|
+
else
|
19
|
+
@conf = Waitress.serve! true
|
20
|
+
end
|
21
|
+
@conf.run
|
22
|
+
@conf.join
|
data/ext/Thanks.md
CHANGED
@@ -1 +1 @@
|
|
1
|
-
The Native Extensions for the HTTP Parser are taken from the [mongrel project](https://github.com/mongrel/mongrel)
|
1
|
+
The Native Extensions for the HTTP Parser are taken from the [mongrel project](https://github.com/mongrel/mongrel)
|
@@ -1,15 +1,15 @@
|
|
1
|
-
#ifndef ext_help_h
|
2
|
-
#define ext_help_h
|
3
|
-
|
4
|
-
#define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be.");
|
5
|
-
#define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name);
|
6
|
-
#define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
|
7
|
-
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
8
|
-
|
9
|
-
#ifdef DEBUG
|
10
|
-
#define TRACE() fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)
|
11
|
-
#else
|
12
|
-
#define TRACE()
|
13
|
-
#endif
|
14
|
-
|
15
|
-
#endif
|
1
|
+
#ifndef ext_help_h
|
2
|
+
#define ext_help_h
|
3
|
+
|
4
|
+
#define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be.");
|
5
|
+
#define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name);
|
6
|
+
#define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
|
7
|
+
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
|
8
|
+
|
9
|
+
#ifdef DEBUG
|
10
|
+
#define TRACE() fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)
|
11
|
+
#else
|
12
|
+
#define TRACE()
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#endif
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'mkmf'
|
2
|
-
|
3
|
-
dir_config("waitress_http11")
|
4
|
-
have_library("c", "main")
|
5
|
-
|
6
|
-
create_makefile("waitress_http11")
|
1
|
+
require 'mkmf'
|
2
|
+
|
3
|
+
dir_config("waitress_http11")
|
4
|
+
have_library("c", "main")
|
5
|
+
|
6
|
+
create_makefile("waitress_http11")
|