fix(api): handle correctly filename that takes more that 200 bytes

This commit is contained in:
Julien Neuhart
2026-03-27 20:55:50 +01:00
parent 40d75882a2
commit 8f7c1c98ad
16 changed files with 233 additions and 38 deletions

View File

@@ -764,3 +764,16 @@ Feature: /forms/pdfengines/split
| pdfa | PDF/A-3b | field |
| embeds | testdata/embed_1.xml | file |
Then the response status code should be 200
# See: https://github.com/gotenberg/gotenberg/issues/1500.
Scenario: POST /forms/pdfengines/split (Long Filename)
Given I have a default Gotenberg container
When I make a "POST" request to Gotenberg at the "/forms/pdfengines/split" endpoint with the following form data and header(s):
| files | testdata/Longitudinell_jämförelse_mellan_laserkirurgi_och_strålbehandling_gällande_röstkvalitet_och_självskattad_kommunikation_upp_till_två_år_efter_tidig_stämbandscancer_i_ett_randomiserat_kontrollerat_försök.pdf | file |
| splitMode | pages | field |
| splitSpan | 1 | field |
| splitUnify | true | field |
| Gotenberg-Output-Filename | foo | header |
Then the response status code should be 200
Then the response header "Content-Type" should be "application/pdf"
Then there should be 1 PDF(s) in the response