Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » 400 Bad Request
400 Bad Request [message #871525] Mon, 14 May 2012 06:27
karthik elavan is currently offline karthik elavan
Messages: 70
Registered: August 2011
Location: Chennai
Member
Hi,

I have developed middle-tier application which is used for blackberry, iphone etc..

In that application am facing a new issue.

There is an url called "videos.get" which needs user-agent as input and returns a video play url as response

In middle-tier for this url "videos.get" written a controller called "VideosController" and in that controller hit an another url (by adding some header fields) to get the video play response (an url to download the video)

header fields added are:

public DefaultHttpClient appgatewayClient;
public HttpPost post = new HttpPost();

auth = Base64.encode((username + ":" + password), "UTF-8");
post.setURI(new URI(videosUrl));
post.addHeader("Authorization", "Basic "+ auth);
post.setHeader("HTTP", "1.1");
post.setHeader("X-Api-Version", apiVersion);
post.setHeader("X-App-Id ", appId);
post.setHeader("X-Subscriber-Id", msisdnNumber);

We have three types of server environments:

1. Development mode - In our office
2. Test server mode - In our office (India)
3. Live server - In Europe

This videosController works both in development & test server, and it throws the below error in live server

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
The number of request header fields exceeds this server's limit.</p>
</body></html>

This videosController gives the correct response when I last deployed my war file in live server and after some times it throws the above error, and when I restart my bundle it works for some times after that it again throws this above error

Server used in all places is: Virgo-tomcat server 3.0.2

Thanks in advance,
Karthik.

[Updated on: Mon, 14 May 2012 09:11]

Report message to a moderator

Previous Topic:How to: create DWP programmatically?
Next Topic:Install WST only?
Goto Forum:
  


Current Time: Thu Aug 28 23:38:12 EDT 2014

Powered by FUDForum. Page generated in 0.07040 seconds