gloo-web 1.0 → 1.1

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: 6900b170922bb867ef849c9391a960487bdc632f90fa15f90e7cd1d277646335
4
- data.tar.gz: b5073a6ef232aa5c104151cf83ab709f6637be3d0ec72d06b9636cdbc37b5756
3
+ metadata.gz: b7fbfaa7f208510b4d12410fa16262bb538e95b42eed297082a801c6ea14fc72
4
+ data.tar.gz: e24a557148c2113ac7ec0a7eb03adcffdd0ccf905813e4bb5425290ef38b8673
5
5
  SHA512:
6
- metadata.gz: 7379751042a00c1e76e49c32ca645241e65d8f33bf994fa2ce08cbe46f368e507eecc279e47940ad13124179fb3ed58ff86695b71ec197855de8c01d621cdf16
7
- data.tar.gz: 26d890475c4ef8e1e32696b5d8ed7e685b5cf350465b05daa416887d49991928d741986727e35f37726b43db774cf19b24a4ea9ce8cb72ca92f1c7cf7ddd23e5
6
+ metadata.gz: b247946511ec4b467ee39fd4a70b26ba4745b3861fe0c43f63cdd1effb2c8984cef697bc224d163c529963acc79fb22f98cfe78b7c0eb09733a4369a5170c315
7
+ data.tar.gz: 6c061b2be098433c97292ea0da5b4ac694c850032de46dcb3a2c928c9332241de6082f7f62b1933c7694c474c6cf335e6540a8e31ddb89e339d2008a25febea4
@@ -37,7 +37,7 @@ module WebSvr
37
37
  def initialize( engine, handler, env = nil )
38
38
  @engine = engine
39
39
  @log = @engine.log
40
- @request_params = RequestParams.new( @log )
40
+ @request_params = RequestParams.new( @engine, @log )
41
41
 
42
42
  @handler = handler
43
43
 
@@ -23,7 +23,8 @@ module WebSvr
23
23
  #
24
24
  # Set up the web server.
25
25
  #
26
- def initialize( log )
26
+ def initialize( engine, log )
27
+ @engine = engine
27
28
  @log = log
28
29
  end
29
30
 
@@ -66,38 +67,43 @@ module WebSvr
66
67
  # This is very rough and will need to be fixed.
67
68
  #
68
69
  def init_multipart body
69
- # puts "*********** first lines: *********** "
70
- # body.lines[0..3].each { |line| puts line }
71
- # puts "*********** last lines: *********** "
72
- # body.lines.last(5).each { |line| puts line }
73
- # puts "************************************"
74
-
75
- # boundary = body.lines.first
76
- # puts "boundary: #{boundary}"
77
-
78
- header = body.lines[1..3].join
79
- # puts "header: #{header}"
80
-
81
- footer = body.lines.last(5).join
82
- # puts "footer: #{footer}"
83
-
84
- binary_data = body.lines[4..-6].join
85
- # puts "binary_data length: #{binary_data.length}"
86
- # puts "binary first line: #{binary_data.lines.first}"
87
- # puts "binary last line: #{binary_data.lines.last}"
88
-
89
- i = header.lines.first.index( 'filename=' )
90
- filename = header.lines.first[ i+10..-4 ]
91
- content_type = header.lines.second[14..-3]
92
- # puts "filename: #{filename}"
93
- # puts "content_type: #{content_type}"
94
-
95
- @body_binary = body
96
- @body_params = {}
97
- @body_params[ 'content_type' ] = content_type
98
- @body_params[ 'file_name' ] = filename
99
- @body_params[ 'file_size' ] = binary_data.length
100
- @body_params[ 'file_data' ] = binary_data
70
+ begin
71
+ # puts "*********** first lines: *********** "
72
+ # body.lines[0..3].each { |line| puts line }
73
+ # puts "*********** last lines: *********** "
74
+ # body.lines.last(5).each { |line| puts line }
75
+ # puts "************************************"
76
+
77
+ # boundary = body.lines.first
78
+ # puts "boundary: #{boundary}"
79
+
80
+ header = body.lines[1..3].join
81
+ # puts "header: #{header}"
82
+
83
+ footer = body.lines.last(5).join
84
+ # puts "footer: #{footer}"
85
+
86
+ binary_data = body.lines[4..-6].join
87
+ # puts "binary_data length: #{binary_data.length}"
88
+ # puts "binary first line: #{binary_data.lines.first}"
89
+ # puts "binary last line: #{binary_data.lines.last}"
90
+
91
+ i = header.lines.first.index( 'filename=' )
92
+ filename = header.lines.first[ i+10..-4 ]
93
+ content_type = header.lines.second[14..-3]
94
+ # puts "filename: #{filename}"
95
+ # puts "content_type: #{content_type}"
96
+
97
+ @body_binary = body
98
+ @body_params = {}
99
+ @body_params[ 'content_type' ] = content_type
100
+ @body_params[ 'file_name' ] = filename
101
+ @body_params[ 'file_size' ] = binary_data.length
102
+ @body_params[ 'file_data' ] = binary_data
103
+ rescue => ex
104
+ @engine.log_exception ex
105
+ # @log.error "Error parsing multipart request", ex
106
+ end
101
107
  end
102
108
 
103
109
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gloo-web
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.0'
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-02-06 00:00:00.000000000 Z
11
+ date: 2026-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thin