Browse Source
follow relative URLs in micropub Location response
pull/82/head
Aaron Parecki
8 years ago
No known key found for this signature in database
GPG Key ID: 276C2817346D6056
1 changed files with
2 additions and
2 deletions
-
controllers/micropub.php
|
|
@ -26,7 +26,7 @@ $app->post('/micropub/post', function() use($app) { |
|
|
|
$app->response()->body(json_encode(array( |
|
|
|
'request' => htmlspecialchars($r['request']), |
|
|
|
'response' => htmlspecialchars($r['response']), |
|
|
|
'location' => $r['location'], |
|
|
|
'location' => (isset($r['location']) ? Mf2\resolveUrl($r['location'], $user->micropub_endpoint) : null), |
|
|
|
'error' => $r['error'], |
|
|
|
'curlinfo' => $r['curlinfo'] |
|
|
|
))); |
|
|
@ -69,7 +69,7 @@ $app->post('/micropub/multipart', function() use($app) { |
|
|
|
$app->response()['Content-type'] = 'application/json'; |
|
|
|
$app->response()->body(json_encode(array( |
|
|
|
'response' => (isset($r['response']) ? htmlspecialchars($r['response']) : null), |
|
|
|
'location' => (isset($r['location']) ? $r['location'] : null), |
|
|
|
'location' => (isset($r['location']) ? Mf2\resolveUrl($r['location'], $user->micropub_endpoint) : null), |
|
|
|
'error' => (isset($r['error']) ? $r['error'] : null), |
|
|
|
))); |
|
|
|
} |
|
|
|