Fix Atom feed #764

Merged
KitaitiMakoto merged 9 commits from fix-atom into master 4 years ago
KitaitiMakoto commented 4 years ago (Migrated from github.com)

This patches include breaking change. I percent-encoded URI segments in ap_urls. This affects only future users, blogs and posts. Existing ap_urls will not be changed.

This fixes Atom feeds so that it conform to Atom spec. This should fix Atom-related issues #673 and #735.

**This patches include breaking change.** I percent-encoded URI segments in `ap_url`s. This affects only future users, blogs and posts. Existing `ap_url`s will not be changed. This fixes Atom feeds so that it conform to Atom spec. This should fix Atom-related issues #673 and #735.
codecov[bot] commented 4 years ago (Migrated from github.com)

Codecov Report

Merging #764 into master will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #764      +/-   ##
==========================================
- Coverage   39.01%   38.97%   -0.04%     
==========================================
  Files          73       73              
  Lines        9700     9712      +12     
  Branches     2224     2226       +2     
==========================================
+ Hits         3784     3785       +1     
- Misses       4863     4875      +12     
+ Partials     1053     1052       -1     
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/764?src=pr&el=h1) Report > Merging [#764](https://codecov.io/gh/Plume-org/Plume/pull/764?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/73aa301d4a17953e3437ba3c6d5d6f252ac3b5f2&el=desc) will **decrease** coverage by `0.03%`. > The diff coverage is `0.00%`. ```diff @@ Coverage Diff @@ ## master #764 +/- ## ========================================== - Coverage 39.01% 38.97% -0.04% ========================================== Files 73 73 Lines 9700 9712 +12 Branches 2224 2226 +2 ========================================== + Hits 3784 3785 +1 - Misses 4863 4875 +12 + Partials 1053 1052 -1 ```
elegaanz commented 4 years ago (Migrated from github.com)

Could it be possible to encode URI only for the Atom feed, not in the whole app? The JSON-LD spec (on which ActivityPub is built) says that every URI actually is an IRI, meaning it should be able to contain any Unicode character (with very few exceptions), so I don't know how percent-encoded strings are treated…

Could it be possible to encode URI only for the Atom feed, not in the whole app? The JSON-LD spec (on which ActivityPub is built) says that every URI actually is an IRI, meaning it should be able to contain any Unicode character (with very few exceptions), so I don't know how percent-encoded strings are treated…
KitaitiMakoto commented 4 years ago (Migrated from github.com)

I've done! Thank you for your advice.

And... actually, Atom also uses IRI. Its spec says:

4.2.6. The "atom:id" Element
(snip)
Its content MUST be an IRI, as defined by [RFC3987].

This is the reason why I reverted all the code around percent-encoding. I don't know why W3C feed validator claims IRIs are errors. But, how about deploying IRI version of Atom and convert them to URI if someone reports issue about specified feed reader implementation?

I've done! Thank you for your advice. And... actually, Atom also uses IRI. [Its spec](https://tools.ietf.org/html/rfc4287#section-4.2.6) says: > 4.2.6. The "atom:id" Element > (snip) > Its content MUST be an IRI, as defined by [RFC3987]. This is the reason why I reverted all the code around percent-encoding. I don't know why [W3C feed validator][] claims IRIs are errors. But, how about deploying IRI version of Atom and convert them to URI if someone reports issue about specified feed reader implementation? [W3C feed validator]:https://validator.w3.org/feed/
elegaanz commented 4 years ago (Migrated from github.com)

But, how about deploying IRI version of Atom and convert them to URI if someone reports issue about specified feed reader implementation?

Sorry, but I'm not sure if I understand. Could you please try to rephrase ? (my English is so bad, help) ☹️

> But, how about deploying IRI version of Atom and convert them to URI if someone reports issue about specified feed reader implementation? Sorry, but I'm not sure if I understand. Could you please try to rephrase ? (my English is so bad, help) :frowning_face:
KitaitiMakoto commented 4 years ago (Migrated from github.com)

Thank you for reply. I'm also not good at English. My English should be hard to understand. Will rephrase it. What I mean was...

  • My current patch allows Atom feeds to use IRI in id, link and so on.
  • It is because Atom spec says their value is IRI.
  • Some Atom reader implementations might not parse it correctly.
  • I propose that we accept the possibility until someone reports the issue actually.
  • How do you think about it? If it's okay, can you merge these patches?
  • My point is these patches doesn't lose anything from now.
Thank you for reply. I'm also not good at English. My English should be hard to understand. Will rephrase it. What I mean was... * My current patch allows Atom feeds to use IRI in `id`, `link` and so on. * It is because Atom spec says their value is IRI. * Some Atom reader implementations might not parse it correctly. * I propose that we accept the possibility until someone reports the issue actually. * How do you think about it? If it's okay, can you merge these patches? * My point is these patches doesn't lose anything from now.
elegaanz commented 4 years ago (Migrated from github.com)

Okay, it is clearer, thank you. Indeed, I think we can merge.

Okay, it is clearer, thank you. Indeed, I think we can merge.
elegaanz (Migrated from github.com) approved these changes 4 years ago
KitaitiMakoto commented 4 years ago (Migrated from github.com)

Thank you!

Thank you!

Reviewers

The pull request has been merged as 847d6f7fac.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b fix-atom master
git pull origin fix-atom

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff fix-atom
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#764
Loading…
There is no content yet.