Resolve Recurly invoice PDF response header

Created on 29 March 2022, about 3 years ago
Updated 24 January 2023, about 2 years ago

Problem/Motivation

Upon viewing the invoice as a PDF, the response header is returned as content-type: text/html; instead of content-type: application/pdf;

Steps to reproduce

Issue related to the invoice PDF, when trying to view it as a PDF in user/{uid}/subscription/invoices/{invoice_id}/pdf

Proposed resolution

Drupal\Core\Render\HtmlResponse allows specifying HTML as a payload, and sets the Content-Type header to text/html by default.

The constructor allows passing two additional arguments: a status code, and an array of headers. These allow you to further seed the initial state of the response, as well as to override the Content-Type header

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan mohammad-fayoumi Amman

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024