File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -58,12 +58,12 @@ public class HttpRequest {
5858 * @see Preferences
5959 * @since 1.4
6060 */
61- static class Base64 {
61+ protected static class Base64 {
6262 /**
6363 * Translates the specified byte array into a Base64 string as per
6464 * Preferences.put(byte[]).
6565 */
66- static String byteArrayToBase64 (byte [] a ) {
66+ public static String byteArrayToBase64 (byte [] a ) {
6767 int aLen = a .length ;
6868 int numFullGroups = aLen /3 ;
6969 int numBytesInPartialGroup = aLen - 3 *numFullGroups ;
@@ -443,11 +443,10 @@ private void request() {
443443 connection .setDoInput (true );
444444 connection .setRequestMethod (method );
445445 connection .setRequestProperty ("User-Agent" ,
446- "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4 ) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19 .0.1084.56 Safari/536.5 " );
446+ "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5 ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30 .0.1599.69 Safari/537.36 " );
447447 if ("post" .equalsIgnoreCase (method )) {
448448 connection .setDoOutput (true );
449- connection .setRequestProperty ("Content-Type" ,
450- "application/x-www-form-urlencoded" );
449+ connection .setRequestProperty ("Content-Type" , "application/x-www-form-urlencoded" );
451450 }
452451 if (user != null ) {
453452 String auth = user + ":" + (password != null ? password : "" );
You can’t perform that action at this time.
0 commit comments