mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1366716 - Encode crash submission URI correctly; r=snorp
Correctly encode the crash submission URI so it's valid. MozReview-Commit-ID: KFqloHXDCSd
This commit is contained in:
parent
97df49f5c2
commit
c4f7fca79b
@ -19,6 +19,8 @@ import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.security.MessageDigest;
|
||||
@ -410,7 +412,10 @@ public class CrashReporter extends AppCompatActivity
|
||||
|
||||
Log.i(LOGTAG, "server url: " + spec);
|
||||
try {
|
||||
URI uri = new URI(spec);
|
||||
final URL url = new URL(URLDecoder.decode(spec, "UTF-8"));
|
||||
final URI uri = new URI(url.getProtocol(), url.getUserInfo(),
|
||||
url.getHost(), url.getPort(),
|
||||
url.getPath(), url.getQuery(), url.getRef());
|
||||
HttpURLConnection conn = (HttpURLConnection)ProxySelector.openConnectionWithProxy(uri);
|
||||
conn.setRequestMethod("POST");
|
||||
String boundary = generateBoundary();
|
||||
|
Loading…
Reference in New Issue
Block a user