Open richierg opened 1 month ago
Thanks for the detailed report. I'll try to get to the bottom of it.
It works by authorizing application/octet-stream
in conditions, but I am not sure if it is the good method.
diff --git a/src/main.rs b/src/main.rs
index 1c6d503..b21e9fa 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -120,7 +120,7 @@ fn download(url: &str) -> Result<impl io::Read> {
.get(url)
.header(
header::ACCEPT,
- header::HeaderValue::from_static("application/x-asciicast,application/json"),
+ header::HeaderValue::from_static("application/x-asciicast,application/json,application/octet-stream"),
)
.build()?;
@@ -132,7 +132,7 @@ fn download(url: &str) -> Result<impl io::Read> {
.and_then(|hv| hv.to_str().ok())
.ok_or_else(|| anyhow!("unknown content type".to_owned()))?;
- if ct != "application/x-asciicast" && ct != "application/json" {
+ if ct != "application/x-asciicast" && ct != "application/json" && ct != "application/octet-stream" {
return Err(anyhow!(format!("{ct} is not supported")));
}
Describe the bug Get error
Error: application/octet-stream is not supported
when trying to convert url to gif with command like:https://asciinema.mydomain.com/a/MUmPbyFMlDiGTjzT8wVjeClcm output.gif
This seems to be related to S3 storage usage.To Reproduce Steps to reproduce the behavior:
Expected behavior The gif should be generated
Versions:
Additional context I disable S3 storage, and use local one -> works like a charm. So the download from storage on S3 could be a lead.