openpodcast / forwarder

MVP of podcast forwarder
Apache License 2.0
5 stars 1 forks source link

UTF-8 encoding is broken #2

Closed mre closed 1 year ago

mre commented 2 years ago

when loading the RSS feed https://forwarder.mre.workers.dev/ it contains broken characters:

image

Current headers:

HTTP/3 200 OK
date: Wed, 18 Aug 2022 13:37:26 GMT
content-type: text/plain
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=5q1OYjTfJQtdZzvQM%2BwVbezgyGeNDa8SW%2FkgduH46iUWEwk6%2BXHGV8pb%2Bfu%2F2rpIgLXIQKpkPiPkUJ7KN7krTmJqYHkO2msVFWRIvrwUysCN4s3J6HmJdSSq5PrrVl8BF0eRSa3GmRV5H%2BbCW1f4ojl%2B9EkY"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
vary: Accept-Encoding
server: cloudflare
cf-ray: 6dadd5eca9730081-LHR
content-encoding: br
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

Original headers by redcircle:

HTTP/2 200 OK
content-type: text/xml
date: Wed, 18 Aug 2022 13:39:41 GMT
server: nginx/1.10.3 (Ubuntu)
access-control-allow-origin: *
x-podcache-hostname: app345-us-east-2
x-ratelimit-limit: 1000
x-ratelimit-limit: 500
x-ratelimit-remaining: 997
x-ratelimit-remaining: 499
x-ratelimit-reset: 1644417732
x-ratelimit-reset: 1644417641
strict-transport-security: max-age=31536000; includeSubDomains
content-encoding: br
vary: Accept-Encoding
x-cache: Miss from cloudfront
via: 1.1 26cdacf328fe4eb4e28173938ab3e92c.cloudfront.net (CloudFront)
x-amz-cf-pop: AMS54-C1
x-amz-cf-id: kA_YfMSZDPig1mt8GW24_2D-bba82r0wfXt_0U-U2pN8L27Sx4gRGg==
X-Firefox-Spdy: h2

when importing the RSS to the google podcast client the characters are ok. maybe it is correct and the browser just shows the wrong chars due to a missing information/flag/header?

mre commented 2 years ago

Self reference doesn't match document location

I think we have to change this line

 <atom:link href="https://feeds.megaphone.fm/GLT2733274547" rel="self" type="application/rss+xml"/>

to that

 <atom:link href="https://feeds.megaphone.fm/GLT2733274547" rel="https://feeds.megaphone.fm" type="application/rss+xml"/>

or something along those lines. We cannot refer to ourselves when the link uses a different hostname. 😄

mre commented 2 years ago

And we have to forward the headers.

mre commented 2 years ago

Tasks

mre commented 1 year ago

The rel doesn't seem to be an issue in practice. At least the current forwarder works on all major platforms (Spotify, Apple, Google) at the moment. I'm inclined to close this issue. The optional ignorelist for headers might be a feature we never need, so I'd like to postpone on that because we might have a clearer vision in the future when we need it.

mre commented 1 year ago

Closing to keep the issue tracker clean. See explanation above.