mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-06-03 17:44:06 +02:00
fix invalid scope response
This commit is contained in:
parent
be4245016a
commit
5a91adc1a5
1 changed files with 2 additions and 2 deletions
|
|
@ -35,7 +35,7 @@ class QueryDiscoverResponse extends Response {
|
|||
* @param BasicSearchSchema|null $schema
|
||||
* @param null|int|string $httpStatus
|
||||
*/
|
||||
function __construct($href, BasicSearchSchema $schema, $httpStatus = null) {
|
||||
function __construct($href, BasicSearchSchema $schema = null, $httpStatus = null) {
|
||||
parent::__construct($href, [], $httpStatus);
|
||||
$this->schema = $schema;
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ class QueryDiscoverResponse extends Response {
|
|||
if ($status = $this->getHTTPStatus()) {
|
||||
$writer->writeElement('{DAV:}status', 'HTTP/1.1 ' . $status . ' ' . \Sabre\HTTP\Response::$statusCodes[$status]);
|
||||
}
|
||||
$writer->writeElement('{DAV:}href', $writer->contextUri . \Sabre\HTTP\encodePath($this->getHref()));
|
||||
$writer->writeElement('{DAV:}href', \Sabre\HTTP\encodePath($this->getHref()));
|
||||
|
||||
if ($this->schema) {
|
||||
$writer->writeElement('{DAV:}query-schema', [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue