we are using the following code to talk to our website from our client side app, for some reason, we always get back status code of 503. but then when we manually load the site from browser, it just loads find. anything could be wrong with the code? or is there any special setting on server side that could cause this problem?
// the head method
httphead = new HttpHead(url);
httphead.getParams().setParameter("http.socket.timeout", this.socketTimeout);
httphead.getParams().setParameter("http.protocol.cookie-policy", CookiePolicy.IGNORE_COOKIES);
HttpResponse response = this.httpClient.execute(httphead);
statusCode = response.getStatusLine().getStatusCode();
I would start by using tcpdump (or winpcap in windows) to get packet dumps. Then you can see exactly how the two requests differ. Post the differences here if you still can’t figure out the problem.