+ // TRANS: Client error. Do not translate the quoted "application/[type]" strings.
+ throw new ClientException(_m('Salmon requires "application/magic-envelope+xml". For Diaspora we also accept "application/x-www-form-urlencoded" with an "xml" parameter.', 415));
+ }
+
+ if (empty($envxml)) {
+ throw new ClientException('No magic envelope supplied in POST.');
}
+ try {
+ $magic_env = new MagicEnvelope($envxml); // parse incoming XML as a MagicEnvelope
- $envxml = file_get_contents('php://input');
- $magic_env = new MagicEnvelope($envxml); // parse incoming XML as a MagicEnvelope