From Stephan Huber, "attached is a fix for the rest-http-plugin which should fix the font-issue reported by Phil. The old implementation did forward all requests to the internal http-server via user-events. This prevented error-reporting for missing files, as the request was accidentally handled by the plugin. As a request for missing font-file succeeds and returned an empty file, the curl-plugin hands the data happily to the freetype-plugin which failed trying to load an empty font-file, obviously.

My fix was to rename the standard request handler to a specialized user-event-handler which handles only requests for "/user-event“

So fonts should work on iOS when loaded remotely, even when a local file is available and with the resthttp-plugin serving the presentation.
"
This commit is contained in:
Robert Osfield 2014-03-13 14:02:50 +00:00
parent 7f206fbf80
commit d703a2df44

View File

@ -20,9 +20,9 @@
namespace RestHttp {
class StandardRequestHandler : public RestHttpDevice::RequestHandler {
class UserEventRequestHandler : public RestHttpDevice::RequestHandler {
public:
StandardRequestHandler() : RestHttpDevice::RequestHandler("") {}
UserEventRequestHandler() : RestHttpDevice::RequestHandler("/user-event") {}
virtual bool operator()(const std::string& request_path, const std::string& full_request_path, const Arguments& arguments, http::server::reply& reply)
{
OSG_INFO << "RestHttpDevice :: handling request " << full_request_path << " as user-event" << std::endl;
@ -293,7 +293,7 @@ RestHttpDevice::RestHttpDevice(const std::string& listening_address, const std::
addRequestHandler(new RestHttp::HomeRequestHandler());
addRequestHandler(new RestHttp::StandardRequestHandler());
addRequestHandler(new RestHttp::UserEventRequestHandler());
// start the thread
start();