PHP startup file support
authorLukasz Marek <l.marek@samsung.com>
Thu, 13 Dec 2012 15:40:38 +0000 (16:40 +0100)
committerGerrit Code Review <gerrit2@kim11>
Mon, 17 Dec 2012 10:54:27 +0000 (19:54 +0900)
[Issue#]       LINUXNGWAP-692
[Bug]          White screen when startup file is php
[Cause]        N/A
[Solution]     Enable php files
[Verification] Follow description in jira task (install dc.wgt test from webapi tests).

Change-Id: I3c3e4a5ab9ccd6c2cd8d00f68c949ab36381731e

src/view/webkit/bundles/wrt-wk2-bundle.cpp

index b3bdf65..56fb5b6 100644 (file)
@@ -81,6 +81,8 @@ const char * const SCHEME_FILE = "file://";
 const char * const DATA_STRING = "data:";
 const char * const BASE64_STRING = ";base64,";
 const char * const BLANK_PAGE_URL = "about:blank";
+const char * const HTML_MIME = "text/html";
+const char * const PHP_MIME = "application/x-php";
 }
 
 Bundle::Bundle(WKBundleRef bundle) :
@@ -583,8 +585,6 @@ WKBundlePagePolicyAction Bundle::pageDecidePolicyForResponseCallback(
 {
     LogDebug("pageDecidePolicyForResponseCallback called");
 
-    char const * const HTML_MIME = "text/html";
-
     Assert(response);
     WKStringRef contentTypeRef = WKURLResponseEflCopyContentType(response);
 
@@ -595,7 +595,11 @@ WKBundlePagePolicyAction Bundle::pageDecidePolicyForResponseCallback(
     if (contentType == HTML_MIME)
     {
         LogDebug("Accepting HTML_MIME type");
-
+        return WKBundlePagePolicyActionUse;
+    }
+    if (contentType == PHP_MIME)
+    {
+        LogDebug("Accepting php type");
         return WKBundlePagePolicyActionUse;
     }