Fix Atom feed #764

Birleştirildi
KitaitiMakoto 4 yıl önce fix-atom içindeki 9 işlemeyi master ile birleştirdi
KitaitiMakoto 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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] 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

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 (github.com konumundan göç edildi) 4 yıl önce bu değişiklikleri onayladı
KitaitiMakoto 4 yıl önce yorum yaptı (github.com konumundan göç edildi)

Thank you!

Thank you!

Gözden Geçirenler

Değişiklik isteği 847d6f7fac olarak birleştirildi.
komut satırı talimatlarını da görüntüleyebilirsiniz.

1. Adım:

Proje deponuzdan yeni bir dala göz atın ve değişiklikleri test edin.
git checkout -b fix-atom master
git pull origin fix-atom

2. Adım:

Forgejo'daki değişiklikleri ve güncellemeleri birleştirin.
git checkout master
git merge --no-ff fix-atom
git push origin master
Bu konuşmaya katılmak için oturum aç.
Değerlendirici yok
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Bildirimler
Bitiş Tarihi
Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın.

Bitiş tarihi atanmadı.

Bağımlılıklar

Bağımlılık yok.

Referans: Plume/Plume#764
Yükleniyor…
Henüz bir içerik yok.