Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita2d965f

Browse files
author
zhourenjian@gmail.com
committed
Allow extended classes to access Base64 algorithm
Update user agent
1 parentdb879f4 commita2d965f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎sources/net.sf.j2s.ajax/ajaxcore/net/sf/j2s/ajax/HttpRequest.java‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ public class HttpRequest {
5858
* @see Preferences
5959
* @since 1.4
6060
*/
61-
staticclassBase64 {
61+
protectedstaticclassBase64 {
6262
/**
6363
* Translates the specified byte array into a Base64 string as per
6464
* Preferences.put(byte[]).
6565
*/
66-
staticStringbyteArrayToBase64(byte[]a) {
66+
publicstaticStringbyteArrayToBase64(byte[]a) {
6767
intaLen =a.length;
6868
intnumFullGroups =aLen/3;
6969
intnumBytesInPartialGroup =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 X10_7_4) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5");
446+
"Mozilla/5.0 (Macintosh; Intel Mac OS X10_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
Stringauth =user +":" + (password !=null ?password :"");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp