fluent-plugin-groonga 1.1.1 → 1.1.2

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
  SHA1:
3
- metadata.gz: 409393e5f37e320bd7236591e119c552ddcc6490
4
- data.tar.gz: f7070f11fb9c6126ca5ddd07786e510e6209cf6a
3
+ metadata.gz: 7a9668e4de0a3638480de1d40b46d667d7cab260
4
+ data.tar.gz: e0698d86a5ce4eeeb038ce8987c68901b377c9b7
5
5
  SHA512:
6
- metadata.gz: dd76ea51915f8f84d6f2d5cfc2245fb02e05cee1eedcba341142ac020f43d72db488ac87aac1e40a7dc0d98674bb45124bb0c541e7f010a7dd0478ae857ae785
7
- data.tar.gz: 7c29cbb8d38341cf3d36e0d5ff61626baf3e1a16aea1bef71a0ba5146495c6300e70936c3d62a208028cf9bf06766342d8c09aae2489a3cb7ff05fda18032947
6
+ metadata.gz: 7209bf79d6f9fe172c99ca550cdea907fb745c8bc9c0708e428410799e4f0697ed370678439016f2c636f06fb3a0b34551edc3000ec681122c29d5fcb6226f5c
7
+ data.tar.gz: eac848d799ece9eba22009a84dc08c87cf8147a64b385bf48b27814d1df4bbe9d262619dbcff2a4953624cd52296b1c068bd571ad83144c4aaebf30a3167da9b
@@ -2,6 +2,17 @@
2
2
 
3
3
  # News
4
4
 
5
+ ## 1.1.2: 2016-06-05
6
+
7
+ ### Improvements
8
+
9
+ * in http: Supported `Host` rewriting. It supports groonga-httpd again.
10
+ [groonga-dev:04037][Reported by Hiroaki TACHIKAWA]
11
+
12
+ ### Thanks
13
+
14
+ * Hiroaki TACHIKAWA
15
+
5
16
  ## 1.1.1: 2016-05-27
6
17
 
7
18
  ### Improvements
@@ -17,7 +17,7 @@
17
17
 
18
18
  Gem::Specification.new do |spec|
19
19
  spec.name = "fluent-plugin-groonga"
20
- spec.version = "1.1.1"
20
+ spec.version = "1.1.2"
21
21
  spec.authors = ["Kouhei Sutou"]
22
22
  spec.email = ["kou@clear-code.com"]
23
23
  spec.summary = "Fluentd plugin to store data into Groonga and implement Groonga replication system."
@@ -196,8 +196,15 @@ module Fluent
196
196
  end
197
197
 
198
198
  def on_read(data)
199
- @parser << data
200
- @repeater.write(data)
199
+ begin
200
+ @parser << data
201
+ rescue HTTP::Parser::Error
202
+ $log.error("[input][groonga][error] " +
203
+ "failed to parse HTTP request:",
204
+ :error => $!.to_s)
205
+ $log.error_backtrace
206
+ close
207
+ end
201
208
  end
202
209
 
203
210
  def on_message_begin
@@ -205,10 +212,26 @@ module Fluent
205
212
  end
206
213
 
207
214
  def on_headers_complete(headers)
215
+ method = @parser.http_method
216
+ url = @parser.request_url
217
+ http_version = @parser.http_version.join(".")
218
+ @repeater.write("#{method} #{url} HTTP/#{http_version}\r\n")
219
+ headers.each do |name, value|
220
+ case name
221
+ when /\AHost\z/i
222
+ real_host = @input.real_host
223
+ real_port = @input.real_port
224
+ @repeater.write("#{name}: #{real_host}:#{real_port}\r\n")
225
+ else
226
+ @repeater.write("#{name}: #{value}\r\n")
227
+ end
228
+ end
229
+ @repeater.write("\r\n")
208
230
  end
209
231
 
210
232
  def on_body(chunk)
211
233
  @body << chunk
234
+ @repeater.write(chunk)
212
235
  end
213
236
 
214
237
  def on_message_complete
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-groonga
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-27 00:00:00.000000000 Z
11
+ date: 2016-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd