re PR libgcj/14009 (libgcj HttpURLConnection does not handle situation where retrieving url without trailing slash after domain.)
2004-10-22 Michael Koch <konqueror@gmx.de> PR libjava/14009 * gnu/java/net/protocol/http/Connection.java (sendRequest): Handle case when url.getFile() returns an empty string. From-SVN: r89476
This commit is contained in:
committed by
Michael Koch
parent
eb84665417
commit
7758f90a45
@@ -217,8 +217,10 @@ public final class Connection extends HttpURLConnection
|
||||
new PrintWriter(new OutputStreamWriter(outputStream, "8859_1"));
|
||||
|
||||
// Send request including any request properties that were set.
|
||||
outputWriter.print (getRequestMethod() + " " + url.getFile()
|
||||
+ " HTTP/1.1\r\n");
|
||||
String requestFile = url.getFile();
|
||||
outputWriter.print(getRequestMethod() + " "
|
||||
+ requestFile.length() != 0 ? requestFile : "/";
|
||||
+ " HTTP/1.1\r\n");
|
||||
|
||||
// Set additional HTTP headers.
|
||||
if (getRequestProperty ("Host") == null)
|
||||
|
||||
Reference in New Issue
Block a user