Bring Micropub endpoint closer to the spec
- Detect form-encoded action=... requests, so form-encoded updates work and unhandled actions are no longer created as notes - Default to h-entry when no type is given - Read form-encoded photos from `photo` rather than `photos` - Pass `category` through EntryData so bookmark tags are saved - Accept single values for form-encoded multi-value properties - Return 403 for insufficient_scope and 401 for invalid tokens - Return 400 invalid_request for unsupported post types, update operations and models instead of reporting them as 500s Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c3cf597950
commit
a8004f2958
1 changed files with 179 additions and 50 deletions
|
|
@ -51,7 +51,7 @@ class MicropubHandlerRegistry
|
|||
public function getHandler(string $type): MicropubHandlerInterface
|
||||
{
|
||||
if (! isset($this->handlers[$type])) {
|
||||
throw new MicropubHandlerException("No handler registered for '{$type}'");
|
||||
throw new MicropubHandlerException("Unsupported Micropub request type '{$type}'");
|
||||
}
|
||||
|
||||
return $this->handlers[$type];
|
||||
|
|
|
|||
Loading…
Reference in a new issue