https://issues.shibboleth.net/jira/browse/SSPCPP-551
authorscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 6 May 2013 02:49:14 +0000 (02:49 +0000)
committerscantor <scantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Mon, 6 May 2013 02:49:14 +0000 (02:49 +0000)
git-svn-id: https://svn.shibboleth.net/cpp-sp/branches/REL_2@3844 cb58f699-b61c-0410-a6fe-9272a202ed29

shibsp/handler/impl/DiscoveryFeed.cpp

index 19aecf3..ad567a1 100644 (file)
@@ -171,7 +171,7 @@ pair<bool,long> DiscoveryFeed::run(SPRequest& request, bool isHandler) const
                         string etag = '"' + s + '"';
                         request.setResponseHeader("ETag", etag.c_str());
                     }
-                    request.setContentType("application/json");
+                    request.setContentType("application/json; charset=UTF-8");
                     return make_pair(true, request.sendResponse(buf));
                 }
             }
@@ -197,7 +197,7 @@ pair<bool,long> DiscoveryFeed::run(SPRequest& request, bool isHandler) const
                 }
                 if (out["feed"].string()) {
                     istringstream buf(out["feed"].string());
-                    request.setContentType("application/json");
+                    request.setContentType("application/json; charset=UTF-8");
                     return make_pair(true, request.sendResponse(buf));
                 }
                 throw ConfigurationException("Discovery feed was empty.");
@@ -223,7 +223,7 @@ pair<bool,long> DiscoveryFeed::run(SPRequest& request, bool isHandler) const
             string etag = '"' + s + '"';
             request.setResponseHeader("ETag", etag.c_str());
         }
-        request.setContentType("application/json");
+        request.setContentType("application/json; charset=UTF-8");
         return make_pair(true, request.sendResponse(feed));
     }
     catch (std::exception& ex) {