Skip to content

Conversation

cid-chan
Copy link

This fixes a bug with activitypub related documents: The schema "https://www.w3.org/ns/activitystreams" renders the spec if "application/json" has a lower prioritisation than "text/html".

This fixes a bug with activitypub related documents: The schema "https://www.w3.org/ns/activitystreams" renders the spec if "application/json" has a lower prioritisation than "text/html".
"""
headers = {
'Accept': 'application/ld+json, application/json;q=0.5'
'Accept': 'application/ld+json, application/json;q=0.8'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We define headers['Accept'] here…

}
# FIXME: only if html5lib loaded?
headers['Accept'] = headers['Accept'] + ', text/html;q=0.8, application/xhtml+xml;q=0.8'
headers['Accept'] = headers['Accept'] + ', text/html;q=0.5, application/xhtml+xml;q=0.5'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…and we modify that value here.

  • Would it be possible to specify the final value right away?
  • Probably a comment explaining what the magic 0.5 means would also be helpful to future readers.

@BigBlueHat
Copy link
Contributor

This looks fine generally, but lets get some tests written for it. @anatoly-scherbakov would you be up for doing that to test out the "local tests" you were sad we didn't have here?

@BigBlueHat BigBlueHat added this to the v2.0.4 milestone Feb 5, 2024
@BigBlueHat BigBlueHat modified the milestones: v2.0.4, v2.0.5 Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants