(mensagem de log vazia)
@@ -384,6 +384,7 @@ | ||
384 | 384 | resetConn(); |
385 | 385 | } |
386 | 386 | res_code = conn.getResponseCode(); |
387 | +System.err.println("HC.res:"+res_code); | |
387 | 388 | } |
388 | 389 | catch(Exception e) |
389 | 390 | { |
@@ -403,8 +404,8 @@ | ||
403 | 404 | sbuff_len--; |
404 | 405 | } |
405 | 406 | String response = ""; |
406 | - try{response = new String(buff,0,sbuff_len,"Shift_JIS");}catch(Exception e){} | |
407 | - | |
407 | + try{response = new String(buff,0,sbuff_len);} | |
408 | + catch(Exception e){System.err.println("ERR:"+e);} | |
408 | 409 | return response; |
409 | 410 | } |
410 | 411 |
@@ -87,13 +87,12 @@ | ||
87 | 87 | httpClient = new HttpClient(2048); |
88 | 88 | // 初回認証 |
89 | 89 | httpClient.setRequestMethodContentType(HttpConnection.POST,HttpClient.CT_X_WWW_FORM_URLENCODED); |
90 | - url = IApplication.getCurrentApp().getSourceURL() + "netgaccess?mode=INIT"; | |
90 | + url = IApplication.getCurrentApp().getSourceURL() + "netgaccess"; | |
91 | 91 | httpClient.append("PASS_PHRASE",pass_phrase).appendEnd(); |
92 | 92 | req_code = httpClient.request(url); |
93 | 93 | res_code = httpClient.response(); |
94 | 94 | response = httpClient.getResponseString(); |
95 | 95 | url = response; |
96 | - | |
97 | 96 | // セッション開始 |
98 | 97 | httpClient.resetBuff(); |
99 | 98 | httpClient.setRequestMethodContentType(HttpConnection.POST,HttpClient.CT_X_WWW_FORM_URLENCODED); |
@@ -124,11 +124,15 @@ | ||
124 | 124 | public void authentication(HttpServletRxValue srvlv) throws Exception |
125 | 125 | { |
126 | 126 | String passPhrase = srvlv.getRequestParameter("PASS_PHRASE"); |
127 | - passPhrase = "netginfo@localhost"; | |
127 | + if( passPhrase == null || passPhrase.length()<=0 ) | |
128 | + { | |
129 | + throw new Exception("PASS_PHRASE"); | |
130 | + } | |
128 | 131 | |
129 | 132 | String adminPassPhrase = getInitProperty("ADMIN_PASS_PHRASE",""); |
130 | 133 | if( !(adminPassPhrase.length()>0 && adminPassPhrase.equals(passPhrase)) ) |
131 | 134 | { |
135 | + System.out.println("PASS_ERROR:'"+passPhrase+"'!='"+adminPassPhrase+"'"); | |
132 | 136 | throw new Exception("PASS_PHRASE"); |
133 | 137 | } |
134 | 138 | } |