Re: MOVE fails on collection when IP address is used in the Destination header.

Hi,

On Mon, Jun 25, 2001 at 11:29:44AM -0400, Michael J. Ryan wrote:
> Hi Folks,
>  I'm running into something that I could use some help with. I'm
> trying to rename a collection and am receiving a 502 Bad Gateway.
> It appears that if I use the hostname in the Destination header, ie,
> webfolders.mydocsonline.com:80, then all goes well. However, if I resolve
> it to its IP address and use that instead, 38.144.45.187:80,
> then the command fails. Oh, the collection is empty in case that matters.
> 
>  Should the hostname and IP address be interchangable, or am I
> required to always use the hostname as part of the Destination
> header.  Below are copies of the working and non-working MOVE request.

You should be using the hostname if you know it. If your client is given
a hostname, then resolves it to the IP address, and uses that IP address
the Host header, that defeats the whole point of having the Host header
in the first place: name-based virtual hosting. Consider that a serious
client bug. :)

If your client is only told the IP address by the user, then I think
you're stuck, unless you do a reverse DNS lookup, which might not be a
good idea anyway. Apache/mod_dav won't like an IP address in the
Destination header in the default configuration[*], and MOVE/COPY will
return 502.

Regards,

joe

[*] though it can be configured to know the IP address with the
ServerAlias directive

Received on Monday, 25 June 2001 18:54:26 UTC