Hi,
I have been trying to write a stand-alone software for logging into
orkut. I am now trying using the URLConnection. y programme right now
is simple, it justs opens a URLConnection to the address from url and
displays the content to the terminal. I am running the program from
behind the proxy. For this i am using following code:
System.getProperties().put( "proxySet", "true" );
System.getProperties().put( "proxyHost", "192.168.3.254" );
System.getProperties().put( "proxyPort", "8080" );
and for https, i am using :
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
The problem is some pages open using this, but some pages like
www.orkut.com, yahoo.com, geocities.com etc. cannot be opened. I get
the get the proper date from the header but data length i am getting is
-1. I tried the same code for even forums.devshed.com and some others
like redhat.com and it works for them.
Can somebody please tell me whats wrong ? And how i can i correct it ?
Oliver Wong - 05 Jul 2006 20:35 GMT
> Hi,
>
[quoted text clipped - 20 lines]
>
> Can somebody please tell me whats wrong ? And how i can i correct it ?
It's not clear what you mean by "some pages [...] cannot be opened."
What happens if you try to open them? Exceptions get thrown? Your computer
turns itself off? Something else?
Content length -1 means the length is not known.
- Oliver