Send Content-Type: application/pdf for PDF downloads - #247
Conversation
The download endpoint set an explicit Content-Type for xlsx and csv but not pdf, so PDF exports went out as PHP's default text/html under a .pdf filename. The bytes are a valid PDF, so browsers that sniff cope, but anything trusting the header (proxies, previewers, strict clients) mishandles the file.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 40 minutes Limit details: You’ve used all 3 included reviews currently available. Your 47 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
The download endpoint sets an explicit
Content-Typeforxlsxandcsvbut notpdf, so PDF exports are served as PHP's defaulttext/html; charset=UTF-8under a.pdffilename. The bytes are a valid PDF (%PDF-1.4 … %%EOF) so sniffing browsers cope, but anything trusting the header — proxies, inline previewers, strict HTTP clients — mishandles the file.One-line addition to the extension switch in
AbstractPHPExcelRenderer::renderOutput().Found during demo QA (Linear MAR-104: "PDF download returns Content-Type: text/html under a .pdf filename").
💾 Build file (de4133f).