puma 3.12.5-java → 3.12.6-java

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

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f8e52e71dbe192149dbca10abe4e8bf98f1fed4dd68eb733c0ce3dfe645c6ce
4
- data.tar.gz: 459d0fb2a3c366950602539105c1af700c49ec6138729a29b2a11db71a239751
3
+ metadata.gz: 5b02ea90141e52839bd36eedaff4e1064824a6c147571bab7fca3578547127eb
4
+ data.tar.gz: 1f5652c39e101a7c412f5b3f3a3829b925bda5302cb0e5f12a84ae44c748528d
5
5
  SHA512:
6
- metadata.gz: 0af3eabc17ac3f580c5bc1200f8309528131c38b3d97a35793db299f49fd3aadaf9e5f051765c0f67d21d33db3268390f95c4e093c9a5fce4cde9e848feb8973
7
- data.tar.gz: 8fd28d78cbd2c3d0bd332829e25f623b97b9ec58c8cf8ca60bf657075ff9b2cd4c9c0c5c16351627c6df4d98daacc86e3a00fa99e2b0f0aa4ef9533c3c69bdd1
6
+ metadata.gz: 76d82ddad2ca48e4c46992c665af0abcf1dcf734a4b370033e7928f21e71d0368074cd108c94e5c076e58cbf129ad8a72464537167ab0ae39e437f0ef5c6df50
7
+ data.tar.gz: 3739c36e080c6fb7c471a43c8edb153887deb85d1c7943a88ca42f3c8ab00340207405eef5008a84e2e04dfb1fee1be694575801af2a1e7878868e1958182f3b
@@ -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
  }
data/lib/puma/const.rb CHANGED
@@ -100,7 +100,7 @@ module Puma
100
100
  # too taxing on performance.
101
101
  module Const
102
102
 
103
- PUMA_VERSION = VERSION = "3.12.5".freeze
103
+ PUMA_VERSION = VERSION = "3.12.6".freeze
104
104
  CODE_NAME = "Llamas in Pajamas".freeze
105
105
  PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
106
106
 
Binary file
data/lib/puma/server.rb CHANGED
@@ -665,6 +665,37 @@ module Puma
665
665
  }
666
666
  end
667
667
 
668
+ # Fixup any headers with , in the name to have _ now. We emit
669
+ # headers with , in them during the parse phase to avoid ambiguity
670
+ # with the - to _ conversion for critical headers. But here for
671
+ # compatibility, we'll convert them back. This code is written to
672
+ # avoid allocation in the common case (ie there are no headers
673
+ # with , in their names), that's why it has the extra conditionals.
674
+
675
+ to_delete = nil
676
+ to_add = nil
677
+
678
+ env.each do |k,v|
679
+ if k.start_with?("HTTP_") and k.include?(",") and k != "HTTP_TRANSFER,ENCODING"
680
+ if to_delete
681
+ to_delete << k
682
+ else
683
+ to_delete = [k]
684
+ end
685
+
686
+ unless to_add
687
+ to_add = {}
688
+ end
689
+
690
+ to_add[k.gsub(",", "_")] = v
691
+ end
692
+ end
693
+
694
+ if to_delete
695
+ to_delete.each { |k| env.delete(k) }
696
+ env.merge! to_add
697
+ end
698
+
668
699
  # A rack extension. If the app writes #call'ables to this
669
700
  # array, we will invoke them when the request is done.
670
701
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.12.5
4
+ version: 3.12.6
5
5
  platform: java
6
6
  authors:
7
7
  - Evan Phoenix