11-09-2008 08:10 PM
I use web basic authorisation to obtain a http connection. here is the short segment of the code :
con = (HttpConnection) Connector.open( url );
con.setRequestProperty("user-agent","Mozilla/4.0 (compatible) Java JME/0.0.0.0"); con.setRequestProperty("Authorization", "Basic " + ENCODEDUSERPASS
respCode = con.getResponseCode();
respMessage = con.getResponseMessage();
Everything works fine with http.
However, when I tried to use the same code with https:// url and changed HttpConnection to HttpsConnection in the code, I am getting
413 : Request Entity Too Large
I do not have a problem to connect to http url without basic authorisation; http with basci authorisation; and https without basic authorisation.
The problem is coming only when I attempt to use https url with basic authorisation.
I assume I am missing a detail here.. any ideas, anybody? Thanks...
11-09-2008 08:49 PM
[ after wiating for stupid html editor to finish doing whatever it does... ]
Anyway, assuming my TEXT gets around this html junk, it may help to try this with wget or curl or a similar
utility and fake the profile and user agent. I wasn't sure if wget works on https but on cygwin it did seem
to function. If you get the headers at least you could post them here for a more specific comment.
11-13-2008 09:07 AM
How big are the files you are trying to download? Please have a look at the following links.
What Is - HTTP 413 Request Entity Too Large
Article Number: DB-00623
How To - Download large files using the BlackBerry Mobile Data System
Article Number: DB-00619
11-13-2008 09:50 AM
Is there any reason to suggest that the BB servers care about http vs https? The OP's server of interest
may be reacting differently and in any case a dump from a command line utility would tell us that.
If the servers support "byte-range" requests that is another approach both to get around
the connection limitations and for implementing various kinds of fake streaming.
11-13-2008 10:45 AM
Iam not trying to donwload anything, just to make a connection to the main entry of the directory https://www.xxxx.xom
There is one file inside onlym about 50k
As I mentioned before, the problem came only when the url is https and I include a basic authorization
11-13-2008 10:59 AM
What have you got against finding out what the server is doing? That is, you can go get cygwin ( cygwin.com )
and use curl or maybe wget to hit the server and check the response. I routinely use this to check jad files,
isn't any different here. You can verify that with your assumed headers the server is returning something
sane. Alternatively, you can redirect you BB request to a dummy server and check the request as recieved.
In either case, getting real information would help(" I tried this and got an error. What is wrong?").
I'd be happy to hit your server if you can tell me what you are trying to do and don't have to reveal any
passwords. If I had access to a machine with a static IP that I could install cygwin on, I'd be happy to
setup a test server too but your server logs may tell you what you need.
11-28-2008 04:41 AM