Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Conversation

@antonis
Copy link

@antonis antonis commented Nov 28, 2023

Fixes wordpress-mobile/WordPress-Android#7846

Description

This PR adds the Accept: */* header to:

This aligns with the behaviour of the iOS app wordpress-mobile/WordPress-Android#7846 (comment)

To test

  1. Use the WPAndroid app from Adds XMLRPCRequest missing accept header WordPress-Android#19683
  2. Setup a proxy to observe the network traffic
  3. Login to a self-hosted site. You can use JN to create an ephemeral self hosted site an use the Add self-hosted site option from the site chooser > add(+) menu.
  4. Create a Post, write a comment etc
  5. Add an image from the device
  6. Verify that all the network requests have the Accept: */* header.

Copy link
Contributor

@justtwago justtwago left a comment

Choose a reason for hiding this comment

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

The code looks good! I'm unable to test it since I have difficulties with setting up a test self-hosted site. I'm approving the PR not to block it since it's a straightforward change, but feel free to wait for another review if you wish.

Copy link
Contributor

@justtwago justtwago left a comment

Choose a reason for hiding this comment

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

Tested it on a Jurassic Ninja-based self-hosted site and it works as expected: I can see the accept: */* header. 🚀

@justtwago justtwago merged commit 074487e into trunk Nov 29, 2023
@justtwago justtwago deleted the fix/7846-adds-xmlrpc-accept-header branch November 29, 2023 17:33
@antonis
Copy link
Author

antonis commented Nov 30, 2023

Thank you for reviewing and testing @justtwago 🙇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

requests missing accept header causing default mod_security config to block IP

3 participants