* gnu/java/net/protocol/http/Connection.java
(sendRequest): Dont encode output in default character encoding,
add correct version number to HTTP user agent string.
From-SVN: r75266
* gnu/java/net/protocol/http/Connection.java
(outputStream): New field.
(bufferedOutputStream): New field.
(connect): Initialize outputStream and bufferedOutputStream.
(sendRequest): Create PrintWriter object from outputStream,
support HTTP 1.1, send missing HTTP headers and buffered output data
for POST method.
(getOutputStream): Set request method to POST if output stream is
used, return bufferedOutputStream.
(setRequestMethod): Allow HEAD and POST methods.
This fixes libgcj PR/6302 and libgcj PR/7752.
From-SVN: r75233
* gnu/java/net/protocol/http/Connection.java
(requestProperties): New field.
(addRequestProperty): New method.
(getRequestProperty): New method.
(setRequestProperty): New method.
(getRequestProperties): New method.
From-SVN: r75228
* gnu/java/net/protocol/http/Connection.java
(inputStream): Made it a DataInputStream.
(requestProperties): Removed.
(hdrHash): Removed.
(hdrVec): Removed.
(headers): New field to store headers.
(connect): Initialize inputStream.
(receiveReply): Merged from classpath. The new algorithm is line based
instead of character based.
(getHeaderField): Use headers.
(getHeaderFields): Use headers.
(getKey): Removed.
(getField): Removed.
* gnu/java/net/HeaderFieldHelper.java: New file.
* Makefile.am (ordinary_java_source_files):
Added gnu/java/net/HeaderFieldHelper.java.
* Makefile.in: Regenerated.
From-SVN: r75183
* gnu/java/net/protocol/http/Connection.java
(connect): Call receiveReply().
(receiveReply): Renamed from getHttpHeaders().
(getOutputStream): Moved check on doOutput before check for connection
state.
From-SVN: r75172
2003-12-20 Guilhem Lavaux <guilhem@kaffe.org>
* gnu/java/net/URLParseError.java: New file.
* gnu/java/net/protocol/jar/Handler.java
(parseURL): Throw URLParseError if needed, fix '/' handling.
* java/net/URL.java (URL): Catch URLParseError and
transform it into a MalformedURLException.
From-SVN: r74877
* gnu/java/net/natPlainDatagramSocketImplWin32.cc:
Removed unused InterruptedIOException.h include.
* gnu/java/net/natPlainSocketImplWin32.cc
(connect): Reset and ignore our thread's interrupted
flag instead of testing and throwing an InterruptedIOException
if set.
(accept): Likewise + changed case of SocketTimeoutException
text.
(write): Likewise (for both overloads).
(doRead): Likewise.
From-SVN: r74716
(peekData): Throw SocketTimeoutException instead of
InterruptedIOException on timeout.
(receive): Likewise.
* gnu/java/net/natPlainSocketImplPosix.cc
(read): Made a minor exception text case change.
From-SVN: r74714
* java/net/DatagramPacket.java
(length): Made packge-private to make it accessible via CNI.
(maxlen): New field.
(DatagramPacket): Cleaned up.
(setSocketAddress): Add message to exception.
(setData): Call other setData().
(setData): Call setLength().
(setLength): Initialize maxlen too.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (peekData):
Get maximal length from maxlen field, set length field directly.
(receive): Likewise.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc (peekData):
Get maximal length from maxlen field, set length field directly.
(receive): Likewise.
From-SVN: r74278
2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Connection.java:
Some reformating.
(file): Renamed from fileIn.
(getPermission): Moved around.
From-SVN: r74179
* gnu/java/net/protocol/jar/Connection.java
(Connection): Made class final, merged documentation with classpath.
(file_cache): Made private.
(jar_file): Renamed from jarfile.
From-SVN: r74178
2003-12-01 Michael Koch <konqueror@gmx.de>
* gnu/java/net/natPlainSocketImplPosix.cc
bind(): Dont set SockedImpl.address field on succesful bind.
* gnu/java/net/natPlainSocketImplWin32.cc
bind(): Likewise.
From-SVN: r74102
* gnu/java/net/natPlainDatagramSocketImplPosix.cc
(peekData): Use offset and maximal free space in datagram packet.
(receive): Likewise.
(send): Use offset in datagram packet.
From-SVN: r73843
* include/win32.h (_Jv_platform_close_on_exec): Changed
signature and declared extern.
* win32.cc (_Jv_platform_close_on_exec): Implemented.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc
(create): Use new signature of _Jv_platform_close_on_exec.
* gnu/java/net/natPlainSocketImplWin32.cc
(create): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
(accept): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
* java/io/natFileDescriptorWin32.cc (open): Use
_Jv_platform_close_on_exec.
From-SVN: r73325
2003-10-21 Michael Koch <konqueror@gmx.de>
* gnu/java/net/PlainDatagramSocketImpl.java,
gnu/java/net/PlainSocketImpl.java,
gnu/java/net/natPlainDatagramSocketImplPosix.cc,
gnu/java/net/natPlainDatagramSocketImplWin32.cc,
gnu/java/net/natPlainSocketImplPosix.cc,
gnu/java/net/natPlainSocketImplWin32.cc:
Renamed fnum to native_fd to match classpath more.
From-SVN: r72746
2003-10-18 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Connection.java,
gnu/java/net/protocol/file/Handler.java,
gnu/java/net/protocol/http/Connection.java,
gnu/java/net/protocol/http/Handler.java,
gnu/java/net/protocol/jar/Connection.java,
gnu/java/net/protocol/jar/Handler.java:
Merged copyright text from classpath to make
it possible to merge the classes.
From-SVN: r72638
* gnu/java/net/PlainDatagramSocketImpl.java
(finalize): Moved to directly after constructor.
(getNativeFD): New method.
* gnu/java/net/PlainSocketImpl.java
(getNativeFD): New method.
From-SVN: r71792