Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(test): expect the bare attachment disposition the download path emits (#19132)

MarMar Labs4841fef5e6d9
diff --git a/internal/handler/bot_test.go b/internal/handler/bot_test.go
index 073998e12d..1a4b78b85e 100644
--- a/internal/handler/bot_test.go
+++ b/internal/handler/bot_test.go
@@ -661,10 +661,9 @@ func TestDownloadAttachment_OK(t *testing.T) {
}
cd := w.Header().Get("Content-Disposition")
// Mirrors Python apply_download_file_response_headers: with no
- // explicit ?filename= the disposition is a plain attachment (Go
- // backfills the empty name with "file" via SanitizeContentDispositionFilename).
- if !strings.Contains(cd, "attachment") || !strings.Contains(cd, `filename="file"`) {
- t.Errorf("Content-Disposition = %q, want attachment; filename=\"file\"", cd)
+ // explicit ?filename= the disposition is a plain attachment.
+ if cd != "attachment" {
+ t.Errorf("Content-Disposition = %q, want attachment", cd)
}
}