From: Seongjun Yim Date: Sun, 7 Apr 2013 10:22:56 +0000 (+0900) Subject: fix bug for geolocation and contents download X-Git-Tag: 2.1b_release~42 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fnative%2Fweb.git;a=commitdiff_plain;h=3db8581958d16120c493d29e511373c5696eeee7 fix bug for geolocation and contents download Change-Id: I71e0658e0cf75f83e68bbf902225e8b759c5d47d Signed-off-by: Seongjun Yim --- diff --git a/src/controls/FWebCtrl_UserConfirmPopup.cpp b/src/controls/FWebCtrl_UserConfirmPopup.cpp index 8309036..9704492 100755 --- a/src/controls/FWebCtrl_UserConfirmPopup.cpp +++ b/src/controls/FWebCtrl_UserConfirmPopup.cpp @@ -280,12 +280,13 @@ _UserConfirmPopup::HandleUserAction(Eina_Bool allow) case USER_CONFIRM_GEOLOCATION: { Ewk_Geolocation_Permission_Request* pPolicy = reinterpret_cast< Ewk_Geolocation_Permission_Request* >(__pUserPolicyData); - ewk_geolocation_permission_request_set(pPolicy, allow); if (__pCheckButton->IsSelected()) { result r = AddGeolocationDb(pPolicy, static_cast < bool >(allow)); - SysTryReturnVoidResult(NID_WEB_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r)); + SysTryCatch(NID_WEB_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); } +CATCH: + ewk_geolocation_permission_request_set(pPolicy, allow); break; } default: diff --git a/src/controls/FWebCtrl_WebDataHandler.cpp b/src/controls/FWebCtrl_WebDataHandler.cpp index 94d6300..6c8b720 100755 --- a/src/controls/FWebCtrl_WebDataHandler.cpp +++ b/src/controls/FWebCtrl_WebDataHandler.cpp @@ -60,18 +60,26 @@ _WebDataHandler::~_WebDataHandler(void) result _WebDataHandler::StartDownload(const String& url) { - SysLog(NID_WEB_CTRL, "Start Download %S", url.GetPointer()); + SysLog(NID_WEB_CTRL, "The current value of url is %ls", url.GetPointer()); SysTryReturnResult(NID_WEB_CTRL, __pHttpSession.get() == null, E_INVALID_OPERATION, "[%s] Already Downloading is in progress.", GetErrorMessage(E_INVALID_OPERATION)); Uri baseUri; baseUri.SetUri(url); - ClearLastResult(); + + String domain(baseUri.GetScheme()); + domain.Append(L"://"); + domain.Append(baseUri.GetHost()); + if (baseUri.GetPort() != -1) + { + domain.Append(L":"); + domain.Append(Integer(baseUri.GetPort()).ToString()); + } std::unique_ptr pHttpSession(new (std::nothrow) HttpSession()); SysTryReturnResult(NID_WEB_CTRL, pHttpSession.get() , E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY)); - result r = pHttpSession->Construct(NET_HTTP_SESSION_MODE_NORMAL, null, baseUri.GetHost(), null); + result r = pHttpSession->Construct(NET_HTTP_SESSION_MODE_NORMAL, null, domain, null); SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] propogating.", GetErrorMessage(r)); r = pHttpSession->SetAutoRedirectionEnabled(true); @@ -248,7 +256,7 @@ _WebDataHandler::OnTransactionCompleted(HttpSession& httpSession, HttpTransactio void _WebDataHandler::OnTransactionCertVerificationRequiredN(HttpSession& httpSession, HttpTransaction& httpTransaction, String* pCert) { -httpTransaction.Resume(); + httpTransaction.Resume(); delete pCert; }