ruby-lsapi 5.6 → 5.8

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 683129ad091d40aea2e77ed9d334ebec39445f6fb8d8a90e8447653a99734982
4
- data.tar.gz: 59d3d25ac7ac9d6d2b99550608e892ff56ea78058cf386a80abeff42c00f15c1
3
+ metadata.gz: 25bb6c397ec50194cb0b748361b0e84623148ca88803ebd9d5a25ac2d445d367
4
+ data.tar.gz: 5469a7a000fb7cf30cade06b6e3d5d261bd622719ddfaddc5350e94227edcdf2
5
5
  SHA512:
6
- metadata.gz: 9ff5c2961a204c0dc4b31412252a056e0829865b3fe45bacad4f0edb97f489f68d791e006b310f78ea899dd9ed79d18f30b2cc65024f07005913b76c6ce799b5
7
- data.tar.gz: f6cbbac34f011be2534ef74e58bbce4cb89e8ea18092b9ea41699998a6b3c40d483ac7ec1e5594e3ebe199ad5e09916f8e72180979857433298fc37b39d91d8d
6
+ metadata.gz: beea3f11b03496201e142ff6047e55372bf1a819e165a702d2bcd1b25848621681963065ba5b70110d78537b1f0cc94b40cad6615657ab1652c49eda4ae261a3
7
+ data.tar.gz: afdb209facd04c02ae70a44c0e152073e914adf238955ff243c7d34d753507b56ad18a977d50ad68951016cabbd979fee8065a4b77385542ed8a0e1e12cc012a
data/ext/lsapi/extconf.rb CHANGED
@@ -3,6 +3,9 @@ dir_config( 'lsapi' )
3
3
  if ( have_library( "socket" ))
4
4
  have_library( "nsl" )
5
5
  end
6
+ if RUBY_VERSION =~ /1.8/ then
7
+ $CPPFLAGS += " -DRUBY_18"
8
+ end
6
9
  if RUBY_VERSION =~ /1.9/ then
7
10
  $CPPFLAGS += " -DRUBY_19"
8
11
  end
data/ext/lsapi/lsapidef.h CHANGED
@@ -97,7 +97,7 @@ enum
97
97
  #define LSAPI_INTERNAL_ERROR 9
98
98
 
99
99
 
100
- #define LSAPI_MAX_HEADER_LEN 65535
100
+ #define LSAPI_MAX_HEADER_LEN (1024 * 256)
101
101
  #define LSAPI_MAX_DATA_PACKET_LEN 16384
102
102
 
103
103
  #define LSAPI_RESP_HTTP_HEADER_MAX 32768
data/ext/lsapi/lsapilib.c CHANGED
@@ -284,7 +284,7 @@ void lsapi_perror(const char * pMessage, int err_no)
284
284
  }
285
285
 
286
286
 
287
- static int lsapi_parent_dead()
287
+ static int lsapi_parent_dead(void)
288
288
  {
289
289
  // Return non-zero if the parent is dead. 0 if still alive.
290
290
  if (!s_ppid) {
@@ -2635,8 +2635,8 @@ int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr )
2635
2635
  {
2636
2636
  case '/':
2637
2637
  pAddr->sa_family = AF_UNIX;
2638
- strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
2639
- sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
2638
+ memccpy(((struct sockaddr_un *)pAddr)->sun_path, p, 0,
2639
+ sizeof(((struct sockaddr_un *)pAddr)->sun_path));
2640
2640
  return 0;
2641
2641
 
2642
2642
  case '[':
@@ -2671,12 +2671,7 @@ int LSAPI_ParseSockAddr( const char * pBind, struct sockaddr * pAddr )
2671
2671
  ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = htonl( INADDR_LOOPBACK );
2672
2672
  else
2673
2673
  {
2674
- #ifdef HAVE_INET_PTON
2675
2674
  if (!inet_pton(AF_INET, p, &((struct sockaddr_in *)pAddr)->sin_addr))
2676
- #else
2677
- ((struct sockaddr_in *)pAddr)->sin_addr.s_addr = inet_addr( p );
2678
- if ( ((struct sockaddr_in *)pAddr)->sin_addr.s_addr == INADDR_BROADCAST)
2679
- #endif
2680
2675
  {
2681
2676
  doAddrInfo = 1;
2682
2677
  }
data/ext/lsapi/lsapilib.h CHANGED
@@ -402,7 +402,7 @@ int LSAPI_Postfork_Parent(LSAPI_Request * pReq);
402
402
  #define LSAPI_LOG_PID (0x10000)
403
403
 
404
404
  void LSAPI_Log(int flag, const char * fmt, ...)
405
- #if __GNUC__
405
+ #ifdef __GNUC__
406
406
  __attribute__((format(printf, 2, 3)))
407
407
  #endif
408
408
  ;
data/ext/lsapi/lsruby.c CHANGED
@@ -1,7 +1,10 @@
1
1
 
2
2
  #include "ruby.h"
3
3
 
4
- #if defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
4
+ #if defined( RUBY_18 )
5
+ #include "util.h"
6
+ #include "version.h"
7
+ #elif defined( RUBY_VERSION_CODE ) && RUBY_VERSION_CODE < 180
5
8
  #include "util.h"
6
9
  #else
7
10
  #include <ruby/util.h>
@@ -729,6 +732,11 @@ static VALUE lsapi_isatty(VALUE self)
729
732
  return Qfalse;
730
733
  }
731
734
 
735
+ static VALUE lsapi_isclosed(VALUE self)
736
+ {
737
+ return Qfalse;
738
+ }
739
+
732
740
  static VALUE lsapi_sync(VALUE self)
733
741
  {
734
742
  return Qfalse;
@@ -898,7 +906,7 @@ void Init_lsapi()
898
906
  rb_define_method(cLSAPI, "eof", lsapi_eof, 0);
899
907
  rb_define_method(cLSAPI, "eof?", lsapi_eof, 0);
900
908
  rb_define_method(cLSAPI, "close", lsapi_close, 0);
901
- /* rb_define_method(cLSAPI, "closed?", lsapi_closed, 0); */
909
+ rb_define_method(cLSAPI, "closed?", lsapi_isclosed, 0);
902
910
  rb_define_method(cLSAPI, "binmode", lsapi_binmode, 0);
903
911
  rb_define_method(cLSAPI, "isatty", lsapi_isatty, 0);
904
912
  rb_define_method(cLSAPI, "tty?", lsapi_isatty, 0);
data/lsapi.gemspec CHANGED
@@ -1,14 +1,12 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{ruby-lsapi}
3
- s.version = "5.6"
4
- s.date = %q{2024-01-22}
3
+ s.version = "5.8"
4
+ s.date = %q{2025-07-08}
5
5
  s.description = "This is a ruby extension for fast communication with LiteSpeed Web Server."
6
6
  s.summary = %q{A ruby extension for fast communication with LiteSpeed Web Server.}
7
- s.has_rdoc = false
8
7
  s.authors = ["LiteSpeed Technologies Inc."]
9
8
  s.email = "info@litespeedtech.com"
10
9
  s.homepage = "http://www.litespeedtech.com/"
11
- s.rubyforge_project = "ruby-lsapi"
12
10
  s.files = ["lsapi.gemspec", "README", "examples", "examples/testlsapi.rb", "examples/lsapi_with_cgi.rb", "ext", "ext/lsapi", "ext/lsapi/extconf.rb", "ext/lsapi/lsapidef.h", "ext/lsapi/lsapilib.c", "ext/lsapi/lsapilib.h", "ext/lsapi/lsruby.c", "rails", "rails/dispatch.lsapi", "scripts", "scripts/lsruby_runner.rb", "setup.rb"]
13
11
  s.extra_rdoc_files = ["README"]
14
12
  s.extensions << "ext/lsapi/extconf.rb"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsapi
3
3
  version: !ruby/object:Gem::Version
4
- version: '5.6'
4
+ version: '5.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - LiteSpeed Technologies Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-22 00:00:00.000000000 Z
11
+ date: 2025-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby extension for fast communication with LiteSpeed Web Server.
14
14
  email: info@litespeedtech.com