8
16
Derivar 22

Fix Atom feed #764

Integrado
KitaitiMakoto integrou 9 cometimento(s) do ramo fix-atom no ramo master há 4 anos
KitaitiMakoto comentou há 4 anos (Migrado de 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] comentou há 4 anos (Migrado de 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 comentou há 4 anos (Migrado de 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 comentou há 4 anos (Migrado de 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 comentou há 4 anos (Migrado de 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 comentou há 4 anos (Migrado de 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 comentou há 4 anos (Migrado de 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 (Migrado de github.com) aprovou estas modificações há 4 anos
KitaitiMakoto comentou há 4 anos (Migrado de github.com)

Thank you!

Thank you!

Revisores

A integração foi executada no cometimento 847d6f7fac.

Passo 1:

No seu repositório, crie um novo ramo e teste as modificações.
git checkout -b fix-atom master
git pull origin fix-atom

Passo 2:

Integre as modificações e envie para o Forgejo.
git checkout master
git merge --no-ff fix-atom
git push origin master
Inicie a sessão para participar neste diálogo.
Sem revisores
Sem etapa
Sem encarregados
1 Participantes
Notificações
Data de vencimento
A data de vencimento é inválida ou está fora do intervalo permitido. Por favor, use o formato 'aaaa-mm-dd'.

Sem data de vencimento definida.

Dependências

Não estão definidas dependências.

Referência: Plume/Plume#764
Carregando…
Ainda não há conteúdo.