Commit bbb1394
committed
Improve aws-s3 gzip file detection to avoid false negatives
Directly check the byte stream for the gzip magic number and deflate
compression type. Avoid using http.DetectContentType because it returns
the first match it finds while checking many signatures.
Closes #299681 parent c570227 commit bbb1394
File tree
2 files changed
+4
-9
lines changed- x-pack/filebeat/input/awss3
2 files changed
+4
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
378 | | - | |
379 | | - | |
| 377 | + | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
| 382 | + | |
| 383 | + | |
390 | 384 | | |
391 | 385 | | |
392 | 386 | | |
| |||
0 commit comments