Permalink
Browse files

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.
"
  • Loading branch information...
1 parent c6a5424 commit 624e67a819f927155d0d934237da2006c03944c0 @osg-training-guest osg-training-guest committed Mar 13, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/osgPlugins/RestHttpDevice/RestHttpDevice.cpp
@@ -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();

0 comments on commit 624e67a

Please sign in to comment.