File tree Expand file tree Collapse file tree
cSploit/src/main/java/org/csploit/android/net/http/proxy Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727import java .io .IOException ;
2828import java .io .InputStream ;
2929import java .io .OutputStream ;
30+ import java .io .UnsupportedEncodingException ;
3031
3132public class StreamThread implements Runnable
3233{
@@ -168,7 +169,13 @@ public void run(){
168169 }
169170
170171 if (charset != null ) {
171- mBuffer .setData ((headers + HEAD_SEPARATOR + body ).getBytes (charset ));
172+ try {
173+ mBuffer .setData ((headers + HEAD_SEPARATOR + body ).getBytes (charset ));
174+ }
175+ catch (UnsupportedEncodingException e ){
176+ Logger .error ("UnsupportedEncoding: " + e .getLocalizedMessage ());
177+ mBuffer .setData ((headers + HEAD_SEPARATOR + body ).getBytes ());
178+ }
172179 }
173180 else {
174181 // if we haven't found the charset encoding, just handle it on ByteBuffer()
You can’t perform that action at this time.
0 commit comments