Fix Atom feed #764

Samengevoegd
KitaitiMakoto heeft 9 commits samengevoegd van fix-atom naar master 4 jaren geleden
KitaitiMakoto reageerde 4 jaren geleden (Gemigreerd van 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] reageerde 4 jaren geleden (Gemigreerd van 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 reageerde 4 jaren geleden (Gemigreerd van 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 reageerde 4 jaren geleden (Gemigreerd van 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 reageerde 4 jaren geleden (Gemigreerd van 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 reageerde 4 jaren geleden (Gemigreerd van 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 reageerde 4 jaren geleden (Gemigreerd van 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 (Gemigreerd van github.com) heeft deze veranderingen 4 jaren geleden goedgekeurd
KitaitiMakoto reageerde 4 jaren geleden (Gemigreerd van github.com)

Thank you!

Thank you!

Reviewers

De pull request is samengevoegd als 847d6f7fac.
Je kunt ook command line instructies bekijken.

Stap 1:

Vanuit het project, check een branch uit en test de veranderingen.
git checkout -b fix-atom master
git pull origin fix-atom

Stap 2:

Voeg de wijzigingen samen en update ze op Forgejo.
git checkout master
git merge --no-ff fix-atom
git push origin master
Log in om deel te nemen aan deze discussie.
Geen beoordelaars
Geen mijlpaal
Niet toegewezen
1 deelnemers
Notificaties
Vervaldatum
De deadline is ongeldig of buiten bereik. Gebruik het formaat 'jjjj-mm-dd'.

Geen vervaldatum ingesteld.

Afhankelijkheden

Geen afhankelijkheden ingesteld.

Referentie: Plume/Plume#764
Laden…
Er is nog geen inhoud.