#17610569 SSL 상태에서 파일 업로드시 발생하는 오류 수정

#18070211 SSL 항상/ 선택/ 사용안함 상태 설정시 항상은 늘 SSL 상태로, 선택은 선택된 Action에 대해서만 SSL로, 사용안함은 https로 접속하든 http로 접속하면 접속된 상태를 따르도록 개선



git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6756 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-08-25 02:51:15 +00:00
parent a0ff0e7b2c
commit 2231d9c271
4 changed files with 110 additions and 21 deletions

View file

@ -29,7 +29,8 @@
) $this->gz_enabled = true;
// request method에 따른 컨텐츠 결과물 추출
if(Context::getRequestMethod() == 'XMLRPC') $output = $this->_toXmlDoc($oModule);
if(Context::get('xeVirtualRequestMethod')=='xml') $output = $this->_toVirtualXmlDoc($oModule);
else if(Context::getRequestMethod() == 'XMLRPC') $output = $this->_toXmlDoc($oModule);
else if(Context::getRequestMethod() == 'JSON') $output = $this->_toJSON($oModule);
else $output = $this->_toHTMLDoc($oModule);
@ -178,6 +179,32 @@
return $json;
}
/**
* @brief RequestMethod가 virtualXML이면 성공, 실패, redirect에 대해 컨텐츠 생성
**/
function _toVirtualXmlDoc(&$oModule) {
$error = $oModule->getError();
$message = $oModule->getMessage();
$redirect_url = $oModule->get('redirect_url');
$request_uri = Context::get('xeRequestURI');
if($error === 0) {
if($message != 'success') $output->message = $message;
if($redirect_url) $output->url = $redirect_url;
else $output->url = $request_uri;
} else {
if($message != 'fail') $output->message = $message;
}
$html = '<script type="text/javascript">'."\n";
if($output->message) $html .= 'alert("'.$output->message.'");'."\n";
if($output->url) {
$output->url = preg_replace('/#(.+)$/i','',$output->url);
$html .= 'top.location.href = "'.$output->url.'";'."\n";
}
$html .= '</script>'."\n";
return $html;
}
/**
* @brief RequestMethod가 XML이면 XML 데이터로 컨텐츠 생성