pitchfork 0.18.3 → 0.18.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -349,6 +349,8 @@ static void write_value(VALUE self, struct http_parser *hp,
349
349
 
350
350
  %%{
351
351
  machine http_parser;
352
+ alphtype unsigned char;
353
+ getkey (unsigned char)*p;
352
354
 
353
355
  action mark {MARK(mark, fpc); }
354
356
 
@@ -911,13 +913,10 @@ static VALUE HttpParser_hijacked_bang(VALUE self)
911
913
  static VALUE HttpParser_filter_body(VALUE self, VALUE dst, VALUE src)
912
914
  {
913
915
  struct http_parser *hp = data_get(self);
914
- char *srcptr;
915
916
  long srclen;
916
917
 
917
- srcptr = RSTRING_PTR(src);
918
- srclen = RSTRING_LEN(src);
919
-
920
918
  StringValue(dst);
919
+ srclen = RSTRING_LEN(src);
921
920
 
922
921
  if (HP_FL_TEST(hp, CHUNKED)) {
923
922
  if (!chunked_eof(hp)) {
@@ -928,7 +927,7 @@ static VALUE HttpParser_filter_body(VALUE self, VALUE dst, VALUE src)
928
927
  hp->s.dest_offset = 0;
929
928
  RB_OBJ_WRITE(self, &hp->cont, dst);
930
929
  RB_OBJ_WRITE(self, &hp->buf, src);
931
- http_parser_execute(self, hp, srcptr, srclen);
930
+ http_parser_execute(self, hp, RSTRING_PTR(src), srclen);
932
931
  if (hp->cs == http_parser_error)
933
932
  parser_raise(eHttpParserError, "Invalid HTTP format, parsing fails.");
934
933
 
@@ -963,7 +962,7 @@ static VALUE HttpParser_filter_body(VALUE self, VALUE dst, VALUE src)
963
962
  * when the +src+ buffer is modified (when reading off the socket).
964
963
  */
965
964
  RB_OBJ_WRITE(self, &hp->buf, src);
966
- memcpy(RSTRING_PTR(dst), srcptr, nr);
965
+ memcpy(RSTRING_PTR(dst), RSTRING_PTR(src), nr);
967
966
  hp->len.content -= nr;
968
967
  if (hp->len.content == 0) {
969
968
  HP_FL_SET(hp, REQEOF);
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pitchfork
4
- VERSION = "0.18.3"
4
+ VERSION = "0.18.4"
5
5
  module Const
6
6
  UNICORN_VERSION = '6.1.0'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pitchfork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.3
4
+ version: 0.18.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier