ruby-openid
ruby-openid copied to clipboard
missing charset for StandardFetcher#fetch
Hej, a previous coworker found that working with this gem triggers a server error caused by a missing "charset" for StandardFetcher#fetch in our environment. Sadly we can't fix anything at the OpenID Server, as it's provided by a different Company.
The change he did is
--- a/lib/openid/fetchers.rb
+++ b/lib/openid/fetchers.rb
@@ -211,7 +211,7 @@ module OpenID
if body.nil?
conn.request_get(url.request_uri, headers, &body_size_limitter)
else
- headers["Content-type"] ||= "application/x-www-form-urlencoded"
+ headers["Content-type"] ||= "application/x-www-form-urlencoded; charset=utf-8"
conn.request_post(url.request_uri, body, headers, &body_size_limitter)
end
}
- Do you think this would be save to change for all users of this gem? (#129)
- What would be the best option to make the charset configurable in your opinion?
edit: btw, intention is to get rid of our fork, which i would love to see gone.