Skip to content

Commit

Permalink
Merge pull request #14 from gwen-lg/fix_atom_content_type
Browse files Browse the repository at this point in the history
set content-type on atom feed response
  • Loading branch information
ChristopherBiscardi committed Mar 21, 2024
2 parents 08592f1 + d5aa694 commit 417eea4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/atom_feed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::state::AppState;
use atom_syndication::*;
use axum::{
extract::{Path, State},
http::Request,
http::{header, Request},
response::{IntoResponse, Response},
routing::get,
};
Expand Down Expand Up @@ -114,7 +114,12 @@ Some( EntryBuilder::default()
feed
.set_subtitle(Text::from("What happened this week in the Bevy Engine ecosystem"));
feed.set_entries(entries);
feed.to_string()

let headers = [(
header::CONTENT_TYPE,
"application/atom+xml; charset=utf-8".to_string(),
)];
(headers, feed.to_string())
}

#[cfg(feature = "ssr")]
Expand Down

0 comments on commit 417eea4

Please sign in to comment.