The Content-Type for String is text/html, but it is text/plain for &str. This seems like an unintuitive behavior, one would expect them to behave the same. Is there a reason for this?
I would definitely expect both of those to map to text/plain by default.
After some thought, I've come to agree. Slating for 0.2. My reasoning was that I believed a String being returned coincided with HTML much more often than it did plain text. I'm not sure if that's true or not, but I was convinced with the idea that Rust itself treats &str and String symmetrically, so there's no reason for Rocket not to.
Most helpful comment
After some thought, I've come to agree. Slating for 0.2. My reasoning was that I believed a
Stringbeing returned coincided with HTML much more often than it did plain text. I'm not sure if that's true or not, but I was convinced with the idea that Rust itself treats&strandStringsymmetrically, so there's no reason for Rocket not to.