8
16
Fork 22

Fix Atom feed #764

Zusammengeführt
KitaitiMakoto hat 9 Commits von fix-atom nach master vor 4 Jahren zusammengeführt
KitaitiMakoto hat vor 4 Jahren kommentiert (Migriert von 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] hat vor 4 Jahren kommentiert (Migriert von 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 hat vor 4 Jahren kommentiert (Migriert von 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 hat vor 4 Jahren kommentiert (Migriert von 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 hat vor 4 Jahren kommentiert (Migriert von 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 hat vor 4 Jahren kommentiert (Migriert von 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 hat vor 4 Jahren kommentiert (Migriert von 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 (Migriert von github.com) hat die Änderungen vor 4 Jahren genehmigt
KitaitiMakoto hat vor 4 Jahren kommentiert (Migriert von github.com)

Thank you!

Thank you!

Reviewer

Der Pull Request wurde als 847d6f7fac gemergt.

Schritt 1:

Wechsle auf einen neuen Branch in deinem lokalen Repository und teste die Änderungen.
git checkout -b fix-atom master
git pull origin fix-atom

Schritt 2:

Führe die Änderungen zusammen und aktualisiere den Stand online auf Forgejo.
git checkout master
git merge --no-ff fix-atom
git push origin master
Anmelden, um an der Diskussion teilzunehmen.
Keine Reviewer
Kein Meilenstein
Niemand zuständig
1 Beteiligte
Nachrichten
Fällig am
Das Fälligkeitsdatum ist ungültig oder außerhalb des zulässigen Bereichs. Bitte verwende das Format „jjjj-mm-tt“.

Kein Fälligkeitsdatum gesetzt.

Abhängigkeiten

Keine Abhängigkeiten gesetzt.

Referenz: Plume/Plume#764
Laden…
Hier gibt es bis jetzt noch keinen Inhalt.