users
[Top] [All Lists]

[Fwd: Re: [cinjug-users] Java Browser -- proxy, authentication, and

To: users@xxxxxxxxxx
Subject: [Fwd: Re: [cinjug-users] Java Browser -- proxy, authentication, and https]
From: sbalmos@xxxxxxxxxxxxxxxxxxx
Date: Wed, 12 Sep 2007 10:13:14 -0700 (PDT)
Delivered-to: mailing list users@xxxxxxxxxx
Importance: Normal
Mailing-list: contact users-help@xxxxxxxxxx; run by ezmlm
User-agent: SquirrelMail/1.4.10a
Forgot to hit reply all instead of just reply. :) Forwarded for everyone's
knowledge.

---------------------------- Original Message ----------------------------
Subject: Re: [cinjug-users] Java Browser -- proxy, authentication, and https
From:    sbalmos@xxxxxxxxxxxxxxxxxxx
Date:    Wed, September 12, 2007 10:12 am
To:      "Hudson, Loren (GE Infra, Aviation, Non-GE, US)"
<loren.hudson@xxxxxx>
--------------------------------------------------------------------------

Any reason you can't use commons-httpclient?

http://jakarta.apache.org/httpcomponents/httpclient-3.x/

--Scott

> Ladies and Gentlemen,
>
> The reason I have to do this is really ... dumb, but I still have to do
> it.
>
> I'm trying to implement a browser in java which I can use to
> programmatically download content from an http server.  Doesn't sound so
> hard yet, does it?
>
> The trick is that at my client, I am behind a proxy to which I must
> authenticate.  Again, not so hard.  Aggravating, but not difficult in
> that I can download all of the code I need off of the internet.
>
> The tricky part is using https.  The code and help on the internet
> doesn't seem to be helping.  Do any of you have experience with this?
> The https proxy is at the same ip and port as the http proxy, but for
> some reason, when I turn on the https, I get a "400 Bad Request" error.
>
> Here's the trail as provided by Eclipse
> java.io.IOException
>
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
> tion.java:593)
>
> at com.internal.browser.Browser.run(Browser.java:67)
>
> at com.internal.browser.SecureBrowser.main(SecureBrowser.java:14)
>
> Caused by: java.io.IOException: Server returned HTTP response code: 400
> for URL:
> http://internal-proxy.com:80https://external-server.com/ReverseProxy/Aut
> hentication.html
>
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
> tion.java:791)
>
> at
> sun.net.www.protocol.http.HttpURLConnection.getHeaderFieldKey(HttpURLCon
> nection.java:1490)
>
> at com.internal.browser.Browser.run(Browser.java:60)
>
> ... 1 more
>
> If you want to see the code, I can scrub and provide that on an
> individual basis.
>
> Thanks,
>




<Prev in Thread] Current Thread [Next in Thread>
  • [Fwd: Re: [cinjug-users] Java Browser -- proxy, authentication, and https], sbalmos <=