Stephen,

Your code (partially) works for me. There's a bug in your code that
prevents the method from correctly transmitting the search criteria, but
at least the HTTP message generated by HttpClient looks absolutely
cosher

[DEBUG] header - ->> "SEARCH / HTTP/1.1[\r][\n]"
[DEBUG] header - ->> "Content-Type: text/xml[\r][\n]"
[DEBUG] header - ->> "User-Agent: Jakarta
Commons-HttpClient/3.0[\r][\n]"
[DEBUG] header - ->> "Host: www.yahoo.com[\r][\n]"
[DEBUG] header - ->> "Content-Length: 0[\r][\n]"
[DEBUG] header - ->> "[\r][\n]"
[DEBUG] header - -<< "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - -<< "Date: Thu, 30 Mar 2006 10:41:03 GMT[\r][\n]"
[DEBUG] header - -<< "P3P: policyref="http://p3p.yahoo.com/w3c/p3p.xml";,
CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR
DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA
POL HEA PRE GOV"[\r][\n]"
[DEBUG] header - -<< "Cache-Control: private[\r][\n]"
[DEBUG] header - -<< "Vary: User-Agent[\r][\n]"
[DEBUG] header - -<< "Set-Cookie: FPB=cc0p296eq122nddv; expires=Thu, 01
Jun 2006 19:00:00 GMT; path=/; domain=www.yahoo.com[\r][\n]"
[DEBUG] header - -<< "Connection: close[\r][\n]"
[DEBUG] header - -<< "Transfer-Encoding: chunked[\r][\n]"
[DEBUG] header - -<< "Content-Type: text/html[\r][\n]"

Please debug your application

Oleg


On Thu, 2006-03-30 at 12:27 +0200, STEINER Stephan wrote:
> Roland
> 
> >You can extend PostMethod and override getName() to change the method
> >name:
> 
> Well, I extended EntityEnclosingMethod, which is the same class that
> PostMethod extends. Since getName is a mandatory override, naturally my
> class does override it and returns "SEARCH" (you can verify that from
> the source code I posted.. The entire class is there). I posted the
> first few lines from the data as it goes over the wire and you can see
> where the search ends up.. It's in the header but it's not the command
> that's sent to the server. The first characters that should go over the
> line are SEARCH, anything else and it's not a valid SEARCH request. 
> 
> >The above is not valid HTTP/1.1, since there is no Host: header.
> 
> I only posted the first few lines.. There's a lot more there but why
> bother with stuff that's not really interesting? The Host header is most
> definitely there in each request, be it made from my C# code or my Java
> equivalent. All that really matters here is that the request starts with
> SEARCH, not POST. 
> 
> Regards
> Stephan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to