Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

load_document: Lower priority of HTML inputs #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cid-chan wants to merge 1 commit into digitalbazaar:master
base: master
Choose a base branch
Loading
from cid-chan:pyld

Conversation

@cid-chan
Copy link

@cid-chan cid-chan commented Nov 20, 2022

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

@anatoly-scherbakov anatoly-scherbakov Oct 18, 2023

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

@anatoly-scherbakov anatoly-scherbakov Oct 18, 2023

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.

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?

anatoly-scherbakov reacted with eyes emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@anatoly-scherbakov anatoly-scherbakov anatoly-scherbakov requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

v2.0.5

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /