• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

HTTPURLCONNECTION

 
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ???
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
HTTP_OK=200
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic