http over ssl gives an empty map of headerFields  
Author Message
Ronald Klop





PostPosted: 2005-10-13 3:41:00 Top

java-programmer, http over ssl gives an empty map of headerFields Hello,

I'm trying to run an application which makes a connection over ssl. It
retreives some fields using the method
HttpUrlConnection.getHeaderFields(). But this returns an empty Map. If I
run the same program on a Linux machine with Sun JDK 1.5 it runs very well
and get some headerfields (which are important for the application).

My system is.
$ uname -a
FreeBSD guido.klop.ws 6.0-RC1 FreeBSD 6.0-RC1 #0: Tue Oct 11 00:29:56 CEST
2005 email***@***.com:/usr/obj/usr/src/sys/GUIDO i386

$ java -version
java version "1.5.0-p2"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0-p2-root_06_oct_2005_21_46)
Java HotSpot(TM) Client VM (build 1.5.0-p2-root_06_oct_2005_21_46, mixed
mode)

If I can find the time I will try to create a better testcase, but maybe
it is a known problem and somebody knows how to fix this.

Ronald.

--
Ronald Klop
Amsterdam, The Netherlands
 
ronald-freebsd8





PostPosted: 2005-10-13 3:51:00 Top

java-programmer >> http over ssl gives an empty map of headerFields Hello,

I'm trying to run an application which makes a connection over ssl. It
retreives some fields using the method
HttpUrlConnection.getHeaderFields(). But this returns an empty Map. If I
run the same program on a Linux machine with Sun JDK 1.5 it runs very well
and get some headerfields (which are important for the application).

My system is.
$ uname -a
FreeBSD guido.klop.ws 6.0-RC1 FreeBSD 6.0-RC1 #0: Tue Oct 11 00:29:56 CEST
2005 email***@***.com:/usr/obj/usr/src/sys/GUIDO i386

$ java -version
java version "1.5.0-p2"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0-p2-root_06_oct_2005_21_46)
Java HotSpot(TM) Client VM (build 1.5.0-p2-root_06_oct_2005_21_46, mixed
mode)

If I can find the time I will try to create a better testcase, but maybe
it is a known problem and somebody knows how to fix this.

Ronald.

--
Ronald Klop
Amsterdam, The Netherlands
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
 
past





PostPosted: 2005-10-13 15:32:00 Top

java-programmer >> http over ssl gives an empty map of headerFields Ronald Klop wrote:
> On Wed, 12 Oct 2005 21:40:48 +0200, Ronald Klop
> <email***@***.com> wrote:
>
>> Hello,
>>
>> I'm trying to run an application which makes a connection over ssl.
>> It retreives some fields using the method
>> HttpUrlConnection.getHeaderFields(). But this returns an empty Map. If
>> I run the same program on a Linux machine with Sun JDK 1.5 it runs
>> very well and get some headerfields (which are important for the
>> application).
>>
>> My system is.
>> $ uname -a
>> FreeBSD guido.klop.ws 6.0-RC1 FreeBSD 6.0-RC1 #0: Tue Oct 11 00:29:56
>> CEST 2005 email***@***.com:/usr/obj/usr/src/sys/GUIDO i386
>>
>> $ java -version
>> java version "1.5.0-p2"
>> Java(TM) 2 Runtime Environment, Standard Edition (build
>> 1.5.0-p2-root_06_oct_2005_21_46)
>> Java HotSpot(TM) Client VM (build 1.5.0-p2-root_06_oct_2005_21_46,
>> mixed mode)
>>
>> If I can find the time I will try to create a better testcase, but
>> maybe it is a known problem and somebody knows how to fix this.
>
>
> import java.io.IOException;
> import java.net.HttpURLConnection;
> import java.net.URL;
>
> public final class HttpsTest {
>
> /**
> * @param args
> * @throws IOException
> */
> public static void main(String[] args) throws IOException {
> HttpURLConnection httpsConn = null;
> URL url = new URL("https://www.google.com/");
>
> httpsConn = (HttpURLConnection) url.openConnection();
> System.out.println(httpsConn.getHeaderFields());
> }
>
> }
>
> This class gives this output on FreeBSD 6.0-RC1 and 5.4-STABLE with
> java 1.5:
> $ java HttpsTest
> {}
>
> on 6.0-RC1 with java 1.4:
> $ java HttpsTest
> {Content-Length=[151], null=[HTTP/1.1 302 Found], Date=[Wed, 12 Oct
> 2005 19:52:46 GMT], Content-Type=[text/html], Server=[GFE/1.3],
> Location=[http://www.google.com]}
>
> on Linux 2.6 with java 1.5:
> $ java HttpsTest
> {Content-Length=[151], Date=[Wed, 12 Oct 2005 19:50:24 GMT],
> Content-Type=[text/html], Server=[GFE/1.3],
> Location=[http://www.google.com], null=[HTTP/1.1 302 Found]}
>
> Do other people have this?

Nope, it works fine here (6.0-BETA5) with both 1.4/1.5.

Panagiotis
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"