embulk-input-http 0.22.0 → 0.23.0
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 +4 -4
- data/build.gradle +1 -1
- data/src/main/java/org/embulk/input/http/HttpFileInputPlugin.java +13 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 175926ebb8b9f4dbff0a806fc559ac1a1103f517
|
4
|
+
data.tar.gz: 14a442cbeb472243bc4b83b1bf448d6da11afa8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8b5fa9860063ad4fa3f659cd53df83de39ea6d6ec6aa54fa308833cfe5ac730497c0c2f1a4f5992dfaec3862455faabfd93d8fded6c4e3936357683b755aa65
|
7
|
+
data.tar.gz: 30b3254118b8eeb453a748fa9dbf27e047f61fa3efe616bdc2e8c74b72b199f77574dd2213b6f6f2c7c3b24acbc61827eb91d52f9bcc78069f0f6bd2b3ed4f75
|
data/build.gradle
CHANGED
@@ -46,6 +46,7 @@ import java.io.UnsupportedEncodingException;
|
|
46
46
|
import java.net.URISyntaxException;
|
47
47
|
import java.nio.file.Files;
|
48
48
|
import java.util.ArrayList;
|
49
|
+
import java.util.HashMap;
|
49
50
|
import java.util.List;
|
50
51
|
import java.util.Locale;
|
51
52
|
import java.util.Map;
|
@@ -204,13 +205,19 @@ public class HttpFileInputPlugin implements FileInputPlugin {
|
|
204
205
|
}
|
205
206
|
|
206
207
|
private List<Header> makeHeaders(PluginTask task) {
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
208
|
+
Map<String, String> map = new HashMap<>();
|
209
|
+
map.put("Accept", "*/*");
|
210
|
+
map.put("Accept-Charset", task.getCharset());
|
211
|
+
map.put("Accept-Encoding", "gzip, deflate");
|
212
|
+
map.put("Accept-Language", "en-us,en;q=0.5");
|
213
|
+
map.put("User-Agent", task.getUserAgent());
|
213
214
|
for (Map.Entry<String, String> entry : task.getRequestHeaders().entrySet()) {
|
215
|
+
// Overwrite default headers by user defined headers
|
216
|
+
map.put(entry.getKey(), entry.getValue());
|
217
|
+
}
|
218
|
+
|
219
|
+
List<Header> headers = new ArrayList<>();
|
220
|
+
for (Map.Entry<String, String> entry : map.entrySet()) {
|
214
221
|
headers.add(new BasicHeader(entry.getKey(), entry.getValue()));
|
215
222
|
}
|
216
223
|
return headers;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.23.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takuma kanari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -53,7 +53,7 @@ files:
|
|
53
53
|
- classpath/commons-codec-1.11.jar
|
54
54
|
- classpath/commons-io-2.6.jar
|
55
55
|
- classpath/commons-logging-1.2.jar
|
56
|
-
- classpath/embulk-input-http-0.
|
56
|
+
- classpath/embulk-input-http-0.23.0.jar
|
57
57
|
- classpath/httpclient-4.5.9.jar
|
58
58
|
- classpath/httpcore-4.4.11.jar
|
59
59
|
- config/checkstyle/checkstyle.xml
|