Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » 400 bad request in middle-tier
400 bad request in middle-tier [message #870412] Tue, 08 May 2012 05:14 Go to next message
karthik elavan is currently offline karthik elavanFriend
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: Tue, 08 May 2012 05:17]

Report message to a moderator

Re: 400 bad request in middle-tier [message #871209 is a reply to message #870412] Fri, 11 May 2012 12:57 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 05/07/2012 11:15 PM, karthik elavan wrote:
> Hi,
>
> I have developed middle-tier application which is used for blackberry,
> iphone etc..
>
> [snip]

Despite that this doesn't appear to have anything to do with Eclipse,
you might try the Eclipse web tools forum where more Tomcat-savvy folk
hang out. I would also suggest stackoverflow.com.
Previous Topic:open up jar file
Next Topic:Trying to Import existing Java code into an Eclipse project
Goto Forum:
  


Current Time: Thu Mar 28 18:53:14 GMT 2024

Powered by FUDForum. Page generated in 0.05041 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top