Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LiveComponent] accept live component Content-Type with suffix #1903

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

WebMamba
Copy link
Collaborator

Q A
Bug fix? yes
New feature? no
Issues Fix #1902
License MIT

@carsonbot carsonbot added Bug Bug Fix LiveComponent Status: Needs Review Needs to be reviewed labels Jun 10, 2024
@WebMamba WebMamba force-pushed the accept-content-type-with-suffix branch from fa8d0fc to 044f338 Compare June 10, 2024 12:16
const backendResponse = new BackendResponse(response);
const html = await backendResponse.getBody();
for (const input of Object.values(this.pendingFiles)) {
input.value = '';
}
const headers = backendResponse.response.headers;
if (headers.get('Content-Type') !== 'application/vnd.live-component+html' && !headers.get('X-Live-Redirect')) {
if (!((_a = headers.get('Content-Type')) === null || _a === void 0 ? void 0 : _a.includes('application/vnd.live-component+html')) && !headers.get('X-Live-Redirect')) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omg 😆

"TS makes the code cleaner" they said

@kbond
Copy link
Member

kbond commented Jun 11, 2024

Thanks Matheo.

@kbond kbond merged commit 3b65275 into symfony:2.x Jun 11, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LiveComponent][Bug] Header not recognize if chartset is added
4 participants