gitlab-puma 4.3.3.gitlab.2 → 4.3.5.gitlab.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03e5cb5dedbb4d7954301cdff029724f82ed81b9b9fedafbc21fde9a90b62fdb
4
- data.tar.gz: 703e172841c638fc21999da3b6ffc3672ad2e4a1d70c4c7a73b906571baacbbe
3
+ metadata.gz: 2d0136ecbb0f394c6d59ff107a9e84d60625915becabd6c9bcc034ae9312333b
4
+ data.tar.gz: d049828f4fbe2faebfb1bee05880f92cfa4ac64703dd45190f202d180dcaf53b
5
5
  SHA512:
6
- metadata.gz: a2fe9f28e21ee51ec4f8f9131747131b563b0f3e46f045cd406cc39568b98452622af27a6219eb1fb6f172eac767cbee3875a6e534e9c7e31112ff502dee2c08
7
- data.tar.gz: d0d1e0232bdbe157c8258f96b2ed6c7bec5e5bc5d1e6c616360f294fa7185fa30ad53a5b4c267041b96d2720596eb036a69511a8dd88a7da3e14f1f8bc96de61
6
+ metadata.gz: 589818a5293122c62643a326ee953ca619ed5f7ec57da091156c495cbcbe4cc648ee7db51728af82b3a0df5f356ce67cb38b40db6fde117d4a9a0ed41b67946a
7
+ data.tar.gz: 0c560f7a98ae73442a617d39173dc963b001539bc0b33483543c4d8953ba335428891b623fe1786e577b5d828df12cc3173961071413410148904a3a5a2461ce
data/History.md CHANGED
@@ -4,7 +4,7 @@
4
4
  * Inject small latency to make Puma to prefer workers that are more idle (#2079)
5
5
 
6
6
  * Bugfixes
7
- * Your bugfix goes here (#Github Number)
7
+ * Explicitly include ctype.h to fix compilation warning and build error on MacOS with Xcode 12 (#2304)
8
8
 
9
9
 
10
10
  ## 4.3.3 and 3.12.4 / 2020-02-28
@@ -14,12 +14,14 @@
14
14
 
15
15
  /*
16
16
  * capitalizes all lower-case ASCII characters,
17
- * converts dashes to underscores.
17
+ * converts dashes to underscores, and underscores to commas.
18
18
  */
19
19
  static void snake_upcase_char(char *c)
20
20
  {
21
21
  if (*c >= 'a' && *c <= 'z')
22
22
  *c &= ~0x20;
23
+ else if (*c == '_')
24
+ *c = ',';
23
25
  else if (*c == '-')
24
26
  *c = '_';
25
27
  }
@@ -12,12 +12,14 @@
12
12
 
13
13
  /*
14
14
  * capitalizes all lower-case ASCII characters,
15
- * converts dashes to underscores.
15
+ * converts dashes to underscores, and underscores to commas.
16
16
  */
17
17
  static void snake_upcase_char(char *c)
18
18
  {
19
19
  if (*c >= 'a' && *c <= 'z')
20
20
  *c &= ~0x20;
21
+ else if (*c == '_')
22
+ *c = ',';
21
23
  else if (*c == '-')
22
24
  *c = '_';
23
25
  }
@@ -10,6 +10,7 @@
10
10
  #include "ext_help.h"
11
11
  #include <assert.h>
12
12
  #include <string.h>
13
+ #include <ctype.h>
13
14
  #include "http11_parser.h"
14
15
 
15
16
  #ifndef MANAGED_STRINGS
@@ -285,8 +285,16 @@ module Puma
285
285
 
286
286
  te = @env[TRANSFER_ENCODING2]
287
287
 
288
- if te && CHUNKED.casecmp(te) == 0
289
- return setup_chunked_body(body)
288
+ if te
289
+ if te.include?(",")
290
+ te.split(",").each do |part|
291
+ if CHUNKED.casecmp(part.strip) == 0
292
+ return setup_chunked_body(body)
293
+ end
294
+ end
295
+ elsif CHUNKED.casecmp(te) == 0
296
+ return setup_chunked_body(body)
297
+ end
290
298
  end
291
299
 
292
300
  @chunked_body = false
@@ -100,7 +100,7 @@ module Puma
100
100
  # too taxing on performance.
101
101
  module Const
102
102
 
103
- PUMA_VERSION = VERSION = "4.3.3.gitlab.2".freeze
103
+ PUMA_VERSION = VERSION = "4.3.5.gitlab.3".freeze
104
104
  CODE_NAME = "Mysterious Traveller".freeze
105
105
  PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
106
106
 
@@ -681,6 +681,37 @@ module Puma
681
681
  }
682
682
  end
683
683
 
684
+ # Fixup any headers with , in the name to have _ now. We emit
685
+ # headers with , in them during the parse phase to avoid ambiguity
686
+ # with the - to _ conversion for critical headers. But here for
687
+ # compatibility, we'll convert them back. This code is written to
688
+ # avoid allocation in the common case (ie there are no headers
689
+ # with , in their names), that's why it has the extra conditionals.
690
+
691
+ to_delete = nil
692
+ to_add = nil
693
+
694
+ env.each do |k,v|
695
+ if k.start_with?("HTTP_") and k.include?(",") and k != "HTTP_TRANSFER,ENCODING"
696
+ if to_delete
697
+ to_delete << k
698
+ else
699
+ to_delete = [k]
700
+ end
701
+
702
+ unless to_add
703
+ to_add = {}
704
+ end
705
+
706
+ to_add[k.gsub(",", "_")] = v
707
+ end
708
+ end
709
+
710
+ if to_delete
711
+ to_delete.each { |k| env.delete(k) }
712
+ env.merge! to_add
713
+ end
714
+
684
715
  # A rack extension. If the app writes #call'ables to this
685
716
  # array, we will invoke them when the request is done.
686
717
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.3.gitlab.2
4
+ version: 4.3.5.gitlab.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-04 00:00:00.000000000 Z
12
+ date: 2020-08-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nio4r
@@ -138,8 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: 1.3.1
140
140
  requirements: []
141
- rubyforge_project:
142
- rubygems_version: 2.7.6.2
141
+ rubygems_version: 3.1.2
143
142
  signing_key:
144
143
  specification_version: 4
145
144
  summary: Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for