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

Fix: add 'application/zip' accept header #41602

Merged
merged 3 commits into from
Jun 23, 2022
Merged

Fix: add 'application/zip' accept header #41602

merged 3 commits into from
Jun 23, 2022

Conversation

zaerl
Copy link
Contributor

@zaerl zaerl commented Jun 8, 2022

The export call is missing the application/zip accept header. See Automattic/wp-calypso#59527 for further information.

What?

This PR add an Accept: application/zip to the export function.

Why?

When an accept header of */* is sent the browser can't download the file. This happens in production environments.

How?

Testing Instructions

  1. Ensure to run a local production site at http://localhost:8888/wp-admin/ (see instructions here: https://github.com/WordPress/gutenberg/blob/trunk/docs/contributors/code/getting-started-with-code-contribution.md)
  2. Select Appearence -> Editor
  3. Select the top right menu
  4. Select "Export"
  5. Ensure that a valid .zip is exported

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Jun 8, 2022
@github-actions
Copy link

github-actions bot commented Jun 8, 2022

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @zaerl! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

I can't replicate the issue, but this tests well and makes sense.

@scruffian scruffian merged commit a94c228 into WordPress:trunk Jun 23, 2022
@github-actions
Copy link

Congratulations on your first merged pull request, @zaerl! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 13.6 milestone Jun 23, 2022
@mburridge mburridge added the Needs Dev Note Requires a developer note for a major WordPress release cycle label Sep 14, 2022
@mburridge
Copy link
Contributor

Added the Needs Dev Note label in case this needs a dev note (either individual or as part of a "misc" dev note) for WP 6.1 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository Needs Dev Note Requires a developer note for a major WordPress release cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants