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:
parent
eb84665417
commit
7758f90a45
2 changed files with 10 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue