agoo 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of agoo might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e5b92639ed425d8f0f8d33b8da3b5dd81a11249c5addcaec2707fd8d8917d5b
4
- data.tar.gz: 84c94c8566135a06165d707c0f8f71f5728c347ae35e4deabcdb1c339f1756d3
3
+ metadata.gz: a566ab0bb371b026b0a6699679f4dec21b8ce7b17247216cfe0685d59ba7813b
4
+ data.tar.gz: d924ede365b1ea496e7f9bf170f339442c7b50a5027cffb62870d9e6697ae687
5
5
  SHA512:
6
- metadata.gz: fe77ec0550fe15e3ba8eb63d42c670d6738ce295bbf7dbc59e2566cbfba4a58768fc2d98af1720a73f32970d18cf92967686cc5330bac7b395dd7248a156a45e
7
- data.tar.gz: 49f218eae4272aeda0e915279dc69fed7225e6bcdc07b6382a7a189b451a954b6685e6ce0195cf64c3efa0fb25df4dd1faa0e2e75cb071edfe4e2a24918371c4
6
+ metadata.gz: 6686a6f59c8efa9f4cc0183357bd04fa6ecf7050472e1857cb1fb3a5448b512296f936fa362a0121aa7f0620c2f6f8ad285442f2141d47df67467fe990b6595d
7
+ data.tar.gz: dc451db62e59763103a9fabc8b6670da80d9177c089088da6317641f95782811aff7efe92a05dd2cc6e5caa86df210616cd4b2775b5e411bd18ccd2a82dc8a6d
@@ -0,0 +1,64 @@
1
+ # CHANGELOG
2
+
3
+ ### 2.0.2 - 2018-05-04
4
+
5
+ - Fixed compiler issues for different OSs and compilers.
6
+
7
+ - More tolerant of `SERVER_NAME` capture from HTTP headers.
8
+
9
+ ### 2.0.1 - 2018-05-01
10
+
11
+ - Allow compilation on older macOS compilers.
12
+
13
+ ### 2.0.0 - 2018-04-30
14
+
15
+ - WebSocket and SSE support added.
16
+
17
+ - The API moved to a global server approach to support extended
18
+ handlers for WebSocket and SSE connections.
19
+
20
+ ### 1.2.2 - 2018-03-26
21
+
22
+ - rackup option -s now works with 'agoo' as well as with 'Agoo'.
23
+
24
+ - Fixed a memory leak.
25
+
26
+ ### 1.2.1 - 2018-03-16
27
+
28
+ - Improved Rack handling. Rack version is an array as it was
29
+ supposed to be. Hacked around Rack's handling of HEAD requests so
30
+ that the content length can be returned more easily by the app.
31
+
32
+ ### 1.2.0 - 2018-03-01
33
+
34
+ - Added Rack::Handler::Agoo for a rackup like use of Agoo.
35
+
36
+ - Examples provided.
37
+
38
+ - Default thread count set to zero.
39
+
40
+ ### 1.1.2 - 2018-02-25
41
+
42
+ - Fixed pipelining to handle extreme rates.
43
+
44
+ ### 1.1.1 - 2018-02-23
45
+
46
+ - An `agoo` binary was added to run an Agoo server from the command line.
47
+
48
+ ### 1.1.0 - 2018-02-11
49
+
50
+ - New mime types can now be added
51
+ - Added support for rack.logger
52
+
53
+ ### 1.0.0 - 2018-02-06
54
+
55
+ - Add not found handler support.
56
+ - Fixed segfault due to GC of handlers.
57
+
58
+ ### 0.9.1 - 2018-01-28
59
+
60
+ Updated to get travis working correctly.
61
+
62
+ ### 0.9.0 - 2018-01-28
63
+
64
+ Initial release.
@@ -6,7 +6,7 @@ dir_config(extension_name)
6
6
 
7
7
  $CPPFLAGS += " -DPLATFORM_LINUX" if 'x86_64-linux' == RUBY_PLATFORM
8
8
  # Travis defaults to an older version of gcc to force a newer version.
9
- RbConfig::MAKEFILE_CONFIG['CC'] = "gcc-7" if 'x86_64-linux' == RUBY_PLATFORM
9
+ #RbConfig::MAKEFILE_CONFIG['CC'] = "gcc-7" if 'x86_64-linux' == RUBY_PLATFORM
10
10
 
11
11
  create_makefile(File.join(extension_name, extension_name))
12
12
 
@@ -5,6 +5,7 @@
5
5
  #include <stdlib.h>
6
6
  #include <string.h>
7
7
  #include <sys/stat.h>
8
+ #include <sys/time.h>
8
9
  #include <sys/types.h>
9
10
  #include <time.h>
10
11
 
@@ -346,7 +347,6 @@ log_cat_find(const char *label) {
346
347
  void
347
348
  log_catv(LogCat cat, const char *fmt, va_list ap) {
348
349
  if (cat->on && !the_log.done) {
349
- struct timespec ts;
350
350
  LogEntry e;
351
351
  LogEntry tail;
352
352
  int cnt;
@@ -361,11 +361,23 @@ log_catv(LogCat cat, const char *fmt, va_list ap) {
361
361
  while (atomic_load(&the_log.head) == the_log.tail) {
362
362
  dsleep(RETRY_SECS);
363
363
  }
364
- // TBD fill in the entry at tail
365
- clock_gettime(CLOCK_REALTIME, &ts);
366
364
  e = the_log.tail;
367
365
  e->cat = cat;
368
- e->when = (int64_t)ts.tv_sec * 1000000000LL + (int64_t)ts.tv_nsec;
366
+ {
367
+ #ifdef CLOCK_REALTIME
368
+ struct timespec ts;
369
+
370
+ clock_gettime(CLOCK_REALTIME, &ts);
371
+ e->when = (int64_t)ts.tv_sec * 1000000000LL + (int64_t)ts.tv_nsec;
372
+ #else
373
+ struct timeval tv;
374
+ struct timezone tz;
375
+
376
+ gettimeofday(&tv, &tz);
377
+
378
+ e->when = (int64_t)tv.tv_sec * 1000000000LL + (int64_t)tv.tv_usec * 1000.0;
379
+ #endif
380
+ }
369
381
  e->whatp = NULL;
370
382
  if ((int)sizeof(e->what) <= (cnt = vsnprintf(e->what, sizeof(e->what), fmt, ap))) {
371
383
  e->whatp = (char*)malloc(cnt + 1);
@@ -184,7 +184,7 @@ req_server_name(Req r) {
184
184
  rb_raise(rb_eArgError, "Request is no longer valid.");
185
185
  }
186
186
  if (NULL == (host = con_header_value(r->header.start, r->header.len, "Host", &len))) {
187
- return Qnil;
187
+ return rb_str_new2("unknown");
188
188
  }
189
189
  for (colon = host + len - 1; host < colon; colon--) {
190
190
  if (':' == *colon) {
@@ -192,7 +192,7 @@ req_server_name(Req r) {
192
192
  }
193
193
  }
194
194
  if (host == colon) {
195
- return Qnil;
195
+ return rb_str_new(host, len);
196
196
  }
197
197
  return rb_str_new(host, colon - host);
198
198
  }
@@ -1,5 +1,5 @@
1
1
 
2
2
  module Agoo
3
3
  # Agoo version.
4
- VERSION = '2.0.0'
4
+ VERSION = '2.0.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Ohler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-30 00:00:00.000000000 Z
11
+ date: 2018-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -38,7 +38,10 @@ extensions:
38
38
  - ext/agoo/extconf.rb
39
39
  extra_rdoc_files:
40
40
  - README.md
41
+ - CHANGELOG.md
42
+ - LICENSE
41
43
  files:
44
+ - CHANGELOG.md
42
45
  - LICENSE
43
46
  - README.md
44
47
  - bin/agoo