Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Blob Storage Sink Content-Type Not Reflecting Underlying Media Type #18183

Closed
stemjacobs opened this issue Aug 8, 2023 · 0 comments · Fixed by #18184
Closed

Azure Blob Storage Sink Content-Type Not Reflecting Underlying Media Type #18183

stemjacobs opened this issue Aug 8, 2023 · 0 comments · Fixed by #18184
Labels
type: bug A code related bug.

Comments

@stemjacobs
Copy link
Contributor

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

When using the Azure Blob Storage sink it works splendidly, but will indicate the Content-Type in the blob's metadata in relation to how the payload was compressed vs its underlying encoding type. The sink already correctly sets the Content-Encoding type based on compression chosen. It currently, however, will also set Content-Type based on the type of compression used vs the original media/content type. This is contrary to the expectation touched on in RFC2616 Section 14.11

This causes no issues with actual functionality of the sink and is a minor concern at best. Depending on consuming client implementations there could be some confusion on the expeted returned media type, but that is about it.

With the following settings for the sink:

...
compression = "gzip"
encoding.codec = "json"
...

Actual:

Content-Type = "application/gzip"

Expected:

Content-Type = "application/json"

Configuration

[sources.generate_syslog]
type = "demo_logs"
format = "syslog"
count = 100

[transforms.remap_syslog]
inputs = ["generate_syslog"]
type = "remap"
source = '''
  structured = parse_syslog!(.message)
  . = merge(., structured)
'''

[sinks.emit_syslog]
inputs = ["remap_syslog"]
type = "console"
encoding.codec = "json"

[sinks.azure_storage]
inputs = ["remap_syslog"]
type = "azure_blob"
container_name = "testlogs"
compression = "gzip"
connection_string = "<test_blob_storage_string_here>"
encoding.codec = "json"

Version

0.32.0

Debug Output

No response

Example Data

No response

Additional Context

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A code related bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant