Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Visit the package at [pub.dev](https://pub.dev/packages/solidpod).

## 1.0

+ Disable caching for web [1.0.21 20260908 jesscmoore]
+ Migrate oidc from 0->4 [1.0.20 20260904 gjw]
+ Update dependency (including rdf 1.0.0, renamed from rdflib) [1.0.19]
+ Support both user.server and server/user URIs [1.0.18 20260902 dc]
Expand Down Expand Up @@ -39,8 +40,8 @@ Visit the package at [pub.dev](https://pub.dev/packages/solidpod).
+ Check missing resources [0.12.9 20260520 tonypioneer]
+ Support checking webID [0.12.8 20260520 tonypioneer]
+ Update Try Another WebID workflow [0.12.7 20260520 tonypioneer]
+ Bug fix to ttl rdf for special chars #628 [0.12.6 20260518 tonypioneer]
+ Upgrade solidauth and fix key file saving edge cases [0.12.5 20260427 jesscmoore]
+ Bug fix to ttl RDF for special chars #628 [0.12.6 20260518 tonypioneer]
+ Upgrade solid_auth and fix key file saving edge cases [0.12.5 20260427 jesscmoore]
+ Support user profile. [0.12.4 20260421 tonypioneer]
+ Key map + paths updates. Update file_picker. [0.12.3 20260420 jesscmoore]
+ Add silentLogout() [0.12.2 20260325 tonypioneer]
Expand Down
5 changes: 2 additions & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: solidpodeg
description: "A new Flutter project."
description: 'A new Flutter project.'
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
Expand All @@ -19,7 +19,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ^3.13.2
sdk: '>=3.10.0 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand Down Expand Up @@ -53,7 +53,6 @@ dev_dependencies:

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down
5 changes: 5 additions & 0 deletions lib/src/solid/api/rest_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ Future<ResourceStatus> checkResourceStatus(
'Authorization': 'DPoP $accessToken',
'Link': isFile ? fileTypeLink : dirTypeLink,
'DPoP': dPopToken,
...noHttpCacheHeaders,
},
);

Expand Down Expand Up @@ -372,6 +373,7 @@ Future<ResourceStatus> checkWebIdExists(String webIdUrl) async {
headers: <String, String>{
'Content-Type': ResourceContentType.any.value,
'Link': fileTypeLink,
...noHttpCacheHeaders,
},
);

Expand Down Expand Up @@ -448,6 +450,7 @@ Future<WebIdStatus> checkWebIdProfile(String webIdUrl) async {
'application/trig;q=0.75, '
'text/n3;q=0.7, '
'*/*;q=0.1',
...noHttpCacheHeaders,
},
);

Expand Down Expand Up @@ -586,6 +589,7 @@ Future<Uint8List> getResource(String resourceUrl) async {
'Authorization': 'DPoP $accessToken',
'Connection': 'keep-alive',
'DPoP': dPopToken,
...noHttpCacheHeaders,
},
);

Expand Down Expand Up @@ -614,6 +618,7 @@ Future<({List<String> subDirs, List<String> files})> getResourcesInContainer(
'Authorization': 'DPoP $accessToken',
'Connection': 'keep-alive',
'DPoP': dPopToken,
...noHttpCacheHeaders,
},
);

Expand Down
30 changes: 30 additions & 0 deletions lib/src/solid/constants/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,33 @@ enum FileOpenMode {
/// String value of the mode
final String value;
}

/// Request headers that stop a GET being answered from a stale HTTP cache.
///
/// Solid servers commonly mark responses cacheable for a long period —
/// Community Solid Server sends `Cache-Control: max-age=86400` (24 hours) with
/// `Vary: Accept,Authorization,Origin`. On the web, `package:http` is backed by
/// the browser's `fetch`, which honours that, so a container listing or
/// resource read is answered from the browser cache rather than the POD for a
/// full day. Reads then return whatever was true when the cache entry was
/// written: newly created resources are invisible and deleted ones linger.
///
/// This is web-only in practice — `dart:io`'s `HttpClient`, used on every
/// native platform, implements no shared cache — which is why the symptom
/// appears only in Flutter web builds.
///
/// `no-cache` rather than `no-store`: the response may still be stored, but it
/// must be revalidated with the origin before reuse. Where the server supplies
/// a validator, answered with `304 Not Modified` rather than a full
/// re-download. Community Solid Server advertises `ETag` support via
/// `Access-Control-Expose-Headers`, but does not send a validator on every
/// response (a container listing observed in testing carried neither `ETag`
/// nor `Last-Modified`), so some reads will be full re-fetches. That is the
/// intended trade: correctness over a saved round trip.
///
/// `Pragma` is the HTTP/1.0 spelling, sent alongside for intermediaries that
/// predate `Cache-Control`.
const Map<String, String> noHttpCacheHeaders = <String, String>{
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
};
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: solidpod
description: Support access to private data from PODs on Solid servers.
version: 1.0.20
version: 1.0.21
homepage: https://github.com/anusii/solidpod

environment:
Expand Down
Loading