[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squid-dev
Subject:    Re: 400 Error bad request
From:       Vikram Kumar <vikrampkumar () gmail ! com>
Date:       2011-11-08 4:43:15
Message-ID: 13C8F5CF-1C2F-4379-BD02-F2FF302F9B17 () gmail ! com
[Download RAW message or body]

Thanks Alex will do that ..

Sent from cellphone

On Nov 7, 2011, at 12:04 PM, Alex Rousskov <rousskov@measurement-factory.com> wrote:

> On 11/07/2011 02:15 AM, Vikram Kumar wrote:
> 
>> I am getting the following error... "Error 400 Bad Request". for ICAP
>> Reqmod message. Here's a snippet of the example ICAP client code..
>> 
>> 
>> 
>> request ="GET http://www.foobar.com <http://www.foobar.com/>
>> <http://www.foobar.com/>
>> <http://www.foobar.com/>
>> HTTP/1.1\r";
>> output.println("REQMOD icap://" + server + ":" + "1344" + "/"+ "REQMOD" + "
>> " + "1.0" +"\r");
>> output.println("Host:" + server + ":" + port + "\")
>> output.println("Encapsulated: req-hdr=0, null-body=" + length);
>> output.println("Preview: 0\r");
>> output.println("Allow: 204\r");
>> 
>> output.println("\r");
>> output.println(request);
>> output.println("\r");
>> Appreciate any help on this...this is a very simple ICAP client and i use
>> the same format for sending ICAP options message and that works...for some
>> reason REQMOD is getting rejected as bad request=8A
> 
> Hello Vikram,
> 
>    I recommend that you post questions about writing ICAP clients to
> ICAP Forum as they are not related to Squid. If you repost your question
> there, consider posting the actual headers (instead of the code that
> produces them) and use plain text. You can collect the headers using
> tcpdump, wireshark, server logs, etc.
> 
> I would also double check whether you are sending the protocol name
> ("ICAP") on the first request line, whether you want "\" on the Host:
> header line, and whether you need an extra CRLF after the HTTP request.
> However, please do not discuss those issues here. Instead, capture the
> actual request, carefully compare with valid ICAP requests, and post any
> questions to the ICAP Forum.
> 
> 
> Good luck,
> 
> Alex.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic