Comments (6)
The default rating for HTML in the RDF parser is 0.2, but turns out we are just using the type names without the values. So changing that in CSS would probably already fix the problem.
from communitysolidserver.
see also #1804
from communitysolidserver.
This is a consequence of our content negotiation being too helpful. The server can convert from markdown to HTML, which makes sense. It can also convert HTML to RDF since HTML is a valid RDF format with RDFa. So the server goes through those steps to return the result that was requested, even though that results in an empty document as the original markdown did not contain RDFa tags.
The main solution is to not request turtle when you want to have markdown. I'll have to see if there is something we can do server-side to prevent this issue.
from communitysolidserver.
The main solution is to not request turtle when you want to have markdown.
For some context on the Penny side, that's not really possible. Penny doesn't know in advance what content type it "wants", as it's just following links in the Pod. So really it just wants the type that's most relevant to the user for the given data (usually the content type as it was sent to the server), tie-breaking to Turtle if the resource is properly representable as RDF (hence Accept: text/turtle;q=1.0, /;q=0.5
), which ideally only happens if that representation is lossless. So yeah, agreed that the server is probably too helpful here, as the RDF conversion discards information.
(I actually think converting RDFa to other RDF serialisations is often problematic for the same reason, i.e. it being a lossy conversion. Possibly, an idea would be to only do that if the Accept
header explicitly does not accept text/html
? Or even to never convert it on the server, and let the client handle that if it so desires.)
from communitysolidserver.
can also convert HTML to RDF
That conversion is lossy indeed, so the server should (and as far as I remember, does) assign it an internal quality of less than 1.
And then it just comes down to multiplication of qualities.
If the server (by whatever process) determines the quality of its Turtle for this resource to be 0.7
, then the quality list becomes:
- Turtle: 0.7
- Markdown: 0.5
- HTML: 0.5
tie-breaking
Definitely recommend Penny to upgrade the q=0.5
to something closer to q=0.9
in any case; that allows more freedom for servers.
from communitysolidserver.
Definitely recommend Penny to upgrade the q=0.5 to something closer to q=0.9 in any case; that allows more freedom for servers.
Oh that's a good tip, I'll do that, thanks!
Edit: oh wait, I misread it as turning the 1.0 down to 0.9, just to make it not that maximum value. Aren't the values otherwise arbitrary? I wouldn't expect any behavioural differences between 1.0 and 0.5
vs 1.0 and 0.9
, since the relative priority is still the same?
from communitysolidserver.
Related Issues (20)
- rdf-js is used, but not listed in package.json HOT 1
- Server error when switching to other account HOT 1
- Lock expired error when multiple clients fetch a particular resource from the Community Solid Server. HOT 10
- Crash "buffer undefined" in jsonparse when getting json-ld document HOT 8
- Receiving multiple notifications with WebHooks instead of one when a resource is created. HOT 12
- Static root applies to both root of server and root of pods for subdomain HOT 3
- "Unable to find storage root" for server root under subdomain configuration HOT 3
- Error when running the solid server in multithread mode HOT 2
- Unable to discover ACL resource when only having Control permission HOT 1
- Allow new path placeholders to be registered
- setup and run prettier before eslint HOT 2
- `Invalid predicate IRI: requestParser` after adding requestParser as a parameter HOT 8
- Handle unknown content-types correctly with a file backend HOT 1
- Non-root container metadata templates are ignored with memory backend HOT 1
- `BaseIdentifierStrategy.getParentContainer` returns incorrect results for identifiers with a query parameter
- Server doesn't start when using configuration with redis locker with a Maximum call stack size exceeded error. HOT 1
- Won't work with Upper Case Pod name
- Duplicate JTI error for pods/WebIDs containing Japanese characters
- Server leaves spurious .meta files with a content-length triple HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from communitysolidserver.