Improve company productivity with a Business Account.Sign Up


Squid Proxy 400 Bad Request with client application using Web Services

Posted on 2006-11-01
Medium Priority
Last Modified: 2010-05-18
Hi There guys. Here's my problem. Our rich client java application uses web services to communicate to our web server. At one of our clients, they run a squid proxy on Linux. When a web service gets called, it seems that the squid proxy returns a error message 'Error 400 - Bad Request'. I did some digging around, and found that the squid proxy does not handle relative url's, but only absolute url's, and that's the reason for the apparent 'Error 400'. Seeing that we cannot change our application at this point, is there a way to configure squid to ignore this? Maybe some other work-around suggestion?

thanks alot,
Martin Coetzee
Question by:DaBump
  • 2

Accepted Solution

Paracelsius earned 2000 total points
ID: 17912912
Hi Martin

If squid is used at your clients site as forwarding proxy (like in most common cases) you would have no better option than to rewrite the java app.

Squid expects to have a full URL, so that it know where to connect. Using relative URLs in the html documents is another story, since the browsers will use them to build an absolute URL (not URI)  to connect to the service.

If have access to the clients squid config you could setup a rule to use squid as accelerator (reverse proxy) for your application. But I suppose this would be overkill if you have multiple client.

In my opinion, you cannot get around rewriting the app.


Author Comment

ID: 17913353
Hi Paracelsius, thanks for the comment. What we ended up doing was to change the firewall rules to forward all calls to our domain straight out, instead of passing through the proxy server. This worked. I will need to make changes to our application to handle proxy servers for future problems. Thanks for the help, here's 500 points for you ;)


Expert Comment

ID: 17913584
Hi Martin

Thanks a lot.

Indeed instead of using an application layer gateway (squid) you can forward the packets using DNAT to the server.

Best regards,

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

606 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question