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 {
58
58
* @see Preferences
59
59
* @since 1.4
60
60
*/
61
- static class Base64 {
61
+ protected static class Base64 {
62
62
/**
63
63
* Translates the specified byte array into a Base64 string as per
64
64
* Preferences.put(byte[]).
65
65
*/
66
- static String byteArrayToBase64 (byte [] a ) {
66
+ public static String byteArrayToBase64 (byte [] a ) {
67
67
int aLen = a .length ;
68
68
int numFullGroups = aLen /3 ;
69
69
int numBytesInPartialGroup = aLen - 3 *numFullGroups ;
@@ -443,11 +443,10 @@ private void request() {
443
443
connection .setDoInput (true );
444
444
connection .setRequestMethod (method );
445
445
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 " );
447
447
if ("post" .equalsIgnoreCase (method )) {
448
448
connection .setDoOutput (true );
449
- connection .setRequestProperty ("Content-Type" ,
450
- "application/x-www-form-urlencoded" );
449
+ connection .setRequestProperty ("Content-Type" , "application/x-www-form-urlencoded" );
451
450
}
452
451
if (user != null ) {
453
452
String auth = user + ":" + (password != null ? password : "" );
You can’t perform that action at this time.
0 commit comments