Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117794778
D5066.1775261379.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D5066.1775261379.diff
View Options
diff --git a/src/app/Backends/DAV.php b/src/app/Backends/DAV.php
--- a/src/app/Backends/DAV.php
+++ b/src/app/Backends/DAV.php
@@ -423,16 +423,20 @@
/**
* Search DAV objects in a folder.
*
- * @param string $location Folder location
- * @param DAV\Search $search Search request parameters
- * @param callable $callback A callback to execute on every item
- * @param bool $opaque Return objects as instances of DAV\Opaque
+ * @param string $location Folder location
+ * @param DAV\Search $search Search request parameters
+ * @param callable $callback A callback to execute on every item
+ * @param bool $opaque Return objects as instances of DAV\Opaque
+ * @param array $extraHeaders Extra headers for the REPORT request
*
* @return false|array List of objects on success, False on error
*/
- public function search(string $location, DAV\Search $search, $callback = null, $opaque = false)
+ public function search(string $location, DAV\Search $search, $callback = null, $opaque = false, $extraHeaders = [])
{
- $headers = ['Depth' => $search->depth, 'Prefer' => 'return-minimal'];
+ $headers = array_merge(
+ ['Depth' => $search->depth, 'Prefer' => 'return-minimal'],
+ $extraHeaders
+ );
$response = $this->request($location, 'REPORT', $search, $headers);
diff --git a/src/app/DataMigrator/DAV.php b/src/app/DataMigrator/DAV.php
--- a/src/app/DataMigrator/DAV.php
+++ b/src/app/DataMigrator/DAV.php
@@ -229,7 +229,11 @@
}
return null;
- }
+ },
+ false,
+ // iRony specific workaround for iRony not to go OOM:
+ // iRony does not fetch attachments for the Lightning user-agent, so we exploit that.
+ ['User-Agent' => 'Lightning/1']
);
} catch (RequestException $e) {
// iRony can go out of memory and return a 500 error on large collections.
@@ -299,7 +303,11 @@
}
return [$item->uid, $object];
- }
+ },
+ false,
+ // iRony specific workaround for iRony not to go OOM:
+ // iRony does not fetch attachments for the Lightning user-agent, so we exploit that.
+ ['User-Agent' => 'Lightning/1']
);
} catch (RequestException $e) {
// iRony can go out of memory and return a 500 error on large collections.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 4, 12:09 AM (9 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18827370
Default Alt Text
D5066.1775261379.diff (2 KB)
Attached To
Mode
D5066: Avoid going OOM by pretending we're Lightning
Attached
Detach File
Event Timeline