Skip to content

Commit 2108645

Browse files
Merge pull request #2293 from nextcloud/fix/nextcloud_test/fixture-csrf-requests
2 parents e7d6ad1 + f3bdd04 commit 2108645

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/nextcloud/test/fixtures/webdav/list_directory.regexp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
GET http://localhost/index\.php
21
PROPFIND http://localhost/remote\.php/webdav
32
authorization: Bearer mock
43
content-type: application/xml

packages/nextcloud_test/lib/src/proxy_http_client.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ BaseClient getProxyHttpClient({
1515
final realClient = Client();
1616
return MockClient.streaming((baseRequest, bytesStream) async {
1717
final bodyBytes = await bytesStream.toBytes();
18-
final fixture = _formatHttpRequest(baseRequest, bodyBytes);
19-
onRequest(fixture);
18+
if (baseRequest.url.path != '/index.php') {
19+
final fixture = _formatHttpRequest(baseRequest, bodyBytes);
20+
onRequest(fixture);
21+
}
2022

2123
final request = Request(baseRequest.method, baseRequest.url)
2224
..persistentConnection = baseRequest.persistentConnection

0 commit comments

Comments
 (0)