• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTPURLCONNECTION  RSS feed

 
Frank Jacobsen
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ResponseMessage in loginToOCH: null
cookie=:: sesessionid=ZJC5EHAAAAC43A3GCIG5QHI;Path=/
index 0, null=::HTTP/1.0 200 ok
index 1, Server=::Netscape-Enterprise/3.5.1
index 2, Date=::Tue, 02 Jul 2002 07:11:09 GMT
index 3, Content-Type=::text/html
index 4, Set-Cookie=::sesessionid=ZJC5EHAAAAC43A3GCIG5QHI;Path=/
index 5, Cache-Control=::no-cache="set-cookie,set-cookie2"
index 6, Expires=::Thu, 01 Dec 1994 16:00:00 GMT
index 7, Content-Language=: a
I am trying to connect through a proxy server, to a site that is outside of my intranet�s firewall.
The proxy server requires a login ID and a Password of course.
My login fails, and i get a response code back of 200, whats that respose code ???
 
Raja Islam
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
HTTP_OK=200
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last time I tried to make it past a proxy, I had to base64 encode my username and password. Are you already doing that or have you tried it?
 
javalisa
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This class is very buggy so you may want to peruse Sun's bug parade so see what's in store for you when you use thiis class. I have had so much trouble I am thinking of trying it in C++ or PHP bec. I've been stuck for a month on this class.
 
Dan Beranga
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This works for my employer's website
<code>
final String USERNAME = "your_proxy_username";
final String PASSWORD = "your_proxy_password";
final String PROXY_ADDRESS = "your_proxy_address";
String authString = USERNAME + ":" + PASSWORD ,line;
String auth = "Basic " + new sun.misc.BASE64Encoder().encode(authString.getBytes());
System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost", PROXY_ADDRESS);
System.getProperties().put("proxyPort", "8080");
conn.setRequestProperty("Proxy-Authorization", auth);
</code>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!