Skip to content

Commit

Permalink
fix SendTo
Browse files Browse the repository at this point in the history
  • Loading branch information
isayan committed Jul 16, 2021
1 parent 71cd92b commit d066ea8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
netbeans.org-netbeans-modules-javascript2-requirejs.enabled=true
release_version_major=2.2
release_version_minor=7.0
release_version_minor=7.1
Binary file modified release/YaguraExtender-v2.2.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/extend/util/external/ThemeUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static void changeStyleTheme(RSyntaxTextArea textArea) {
Gutter gutter = RSyntaxUtilities.getGutter(textArea);
if (gutter!=null) {
gutter.setBackground(UIManager.getColor("TextField.background"));
gutter.setLineNumberColor(UIManager.getColor("TextField.background"));
gutter.setLineNumberColor(UIManager.getColor("TextField.foreground"));
}
});
} catch (NullPointerException ex) {
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/yagura/model/SendToServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ public void connectFailed(URI uri, SocketAddress sa, IOException ex) {

protected void outPostHeader(OutputStream out, URL tagetURL) throws IOException, Exception {
HttpService httpService = new HttpService(tagetURL);
out.write(StringUtil.getBytesRaw(String.format("POST %s HTTP/1.1", FileUtil.appendLastSeparator(tagetURL.getFile(), "/")) + HttpUtil.LINE_TERMINATE));
String target = tagetURL.getFile().isEmpty() ? "/" : tagetURL.getFile();
out.write(StringUtil.getBytesRaw(String.format("POST %s HTTP/1.1", target) + HttpUtil.LINE_TERMINATE));
out.write(StringUtil.getBytesRaw(String.format("Host: %s", HttpUtil.buildHost(httpService.getHost(), httpService.getPort(), httpService.isHttps())) + HttpUtil.LINE_TERMINATE));
out.write(StringUtil.getBytesRaw(String.format("User-Agent: %s", "Java-http-client/BurpSuite") + StringUtil.NEW_LINE));
out.write(StringUtil.getBytesRaw(String.format("User-Agent: %s", "Java-http-client/BurpSuite") + HttpUtil.LINE_TERMINATE));
}

protected void outMultipart(String boundary, OutputStream out, IHttpRequestResponse messageInfo) throws IOException, Exception {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/yagura/view/JTransCoderTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private Date getConverterDateTime() {
this.spnDatetime.commitEdit();
date = (Date)this.spnDatetime.getValue();
} catch (ParseException ex) {
logger.log(Level.INFO, null, ex);
logger.log(Level.INFO, ex.getMessage(), ex);
}
return date;
}
Expand All @@ -304,7 +304,7 @@ private Date getGeneraterDateStart() {
this.spnDateStart.commitEdit();
date = (Date)this.spnDateStart.getValue();
} catch (ParseException ex) {
logger.log(Level.INFO, null, ex);
logger.log(Level.INFO, ex.getMessage(), ex);
}
return date;
}
Expand All @@ -319,7 +319,7 @@ private Date getGeneraterDateEnd() {
this.spnDateEnd.commitEdit();
date = (Date)this.spnDateEnd.getValue();
} catch (ParseException ex) {
logger.log(Level.INFO, null, ex);
logger.log(Level.INFO, ex.getMessage(), ex);
}
return date;
}
Expand Down Expand Up @@ -3320,7 +3320,7 @@ private void toSmartDecode(String inputText, TransUtil.EncodePattern encodePatte
this.setOutput(decode, applyCharset);
} catch (java.lang.NumberFormatException ex) {
this.setOutputText(StringUtil.getStackTraceMessage(ex));
logger.log(Level.INFO, null, ex);
logger.log(Level.INFO, ex.getMessage(), ex);
}
}

Expand Down
7 changes: 4 additions & 3 deletions src/main/java/yagura/view/MainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.awt.event.WindowEvent;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -131,10 +132,10 @@ public void windowClosing(WindowEvent e) {
if (CONFIG_FILE.exists()) {
Config.loadFromJson(CONFIG_FILE, option);
}
this.jTransCoder.setEncodingList(UniversalViewProperty.getDefaultEncodingList(Locale.JAPANESE), "UTF-8");
this.jTransCoder.setEncodingList(UniversalViewProperty.getDefaultEncodingList(Locale.JAPANESE), StandardCharsets.UTF_8.name());
this.jTransCoder.setProperty(option.getJTransCoderProperty());
} catch (IOException ex) {
logger.log(Level.WARNING, null, ex);
logger.log(Level.WARNING, ex.getMessage(), ex);
}

UIManager.LookAndFeelInfo[] lafInfo = UIManager.getInstalledLookAndFeels();
Expand Down Expand Up @@ -172,7 +173,7 @@ protected boolean isAvailableLookAndFeel(LookAndFeelUI lafUI) {
LookAndFeel newLAF = (LookAndFeel) (lnfClass.getDeclaredConstructor().newInstance());
return newLAF.isSupportedLookAndFeel();
} catch (Exception ex) {
logger.log(Level.WARNING, null, ex);
logger.log(Level.WARNING, ex.getMessage(), ex);
return false;
}
}
Expand Down

0 comments on commit d066ea8

Please sign in to comment.