Hi all,

I've run into a situation here where I need to go through a proxy (using
squid for testing, at the moment) to the webdav servlet.

The webdav client libraries have a bit of a problem here - no support
for proxies. I've hacked it in for now (it's pretty ugly. I'll send a
patch to anyone that's interested, but it isn't really release-quality
code, I just needed a solution immediately).

However, there's one more problem - squid complains (and returns a 411
error) if methods which aren't meant to have a Content-Length header
have one. For example, a get request should NOT have a content-length.
Right now, we send content-length whenever we can, though it'll often be
the default value (I haven't checked, but I imagine this is 0). So, we
need to suppress this on methods that don't need it. 

What's a neat solution to this? Should we: a) get each method to print
content-length if they need it, b) have a function in each method class
like this: boolean needContentLength(), and print based on that, or c)
(my current solution, for the moment, mostly because it's quick and easy
for a single special case) - just have it suppress the content-length
header if the method is a GET (that's the only one - so far - that's
caused a problem for me).

Michael

Reply via email to