You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Alex K <ri...@gmail.com> on 2018/06/13 16:18:52 UTC

[users@httpd] Apache allowed OPTIONS

Hi all,

I have setup Webav with apache2.
I am testing the setup on a Debian7 with apache 2.2.22.
Although the webdav is functioning ok I have a third party application that
needs to put files on the webdav folder and before it does that it checks
the available methods that apache allows. This app is not able to operate
since apache does not announce the PUT method.

When I check with curl as below I indeed see that PUT is not listed:

curl -sI -X OPTIONS http://169.254.254.55/webdav/
HTTP/1.1 200 OK
Date: Thu, 14 Jun 2018 00:03:22 GMT
Server: Apache/2.2.22 (Debian)
DAV: 1,2
DAV: <http://apache.org/dav/propset/fs/1>
MS-Author-Via: DAV
Allow: *OPTIONS*
,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK
Content-Length: 0
Content-Type: httpd/unix-directory

I have tested above also with Debian9 with apache2 2.4.25 and no PUT method
is listed.
I have tried several combinations with Limit and LimitExcept to no avail.
The PUT functions correctly if one tries to PUT a file but the issue is
that it is not listed and this breaks the third party app as it is
currently built.

Is there any way to make apache list the PUT options as available?

Thanx for any assistance,
Alex

Re: [users@httpd] Apache allowed OPTIONS

Posted by Alex K <ri...@gmail.com>.
Thanx Nick for the feedback.

Indeed when I change the URL to point to a file then I get the PUT reply:

HTTP/1.1 200 OK
Date: Mon, 25 Jun 2018 13:09:26 GMT
Server: Apache/2.4.25 (Debian)
DAV: 1,2
DAV: <http://apache.org/dav/propset/fs/1>
MS-Author-Via: DAV
Allow: OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,*PUT*
,LOCK,UNLOCK
Content-Length: 0

I am still through trying to understand why PUT is not listed when querying
a directory. Tried both "Directory" and "Location" directives with no luck.

To cross check the matter I used the https://github.com/mar10/wsgidav
project and I got quickly a friendly "PUT" even when the URL is a
directory:

curl -sI -X OPTIONS http://172.30.0.45:8080/tmp

The reply is as below with PUT being listed although I did not append a
filename in the URL:

HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 0
DAV: 1,2
Date: Mon, 25 Jun 2018 13:11:42 GMT
Allow: OPTIONS *PUT* MKCOL
MS-Author-Via: DAV
Server: WsgiDAV/2.4.1 Cheroot/6.3.2 Python/2.7.13

I am not sure what you mean with "add a breadcrumb". I would appreciate if
you can elaborate.

Thanx for any feedback,
Alex




On Fri, Jun 15, 2018 at 3:21 AM, Nick Kew <ni...@apache.org> wrote:

>
> > On 13 Jun 2018, at 17:18, Alex K <ri...@gmail.com> wrote:
> >
> >
> > curl -sI -X OPTIONS http://169.254.254.55/webdav/
> >
> > The PUT functions correctly if one tries to PUT a file but the issue is
> that it is not listed and this breaks the third party app as it is
> currently built.
>
> I doubt it.
>
> I expect PUT to that URL returns 405.  The PUT that works for you is to a
> different URL, of the form  http://169.254.254.55/webdav/some-file
>
> Re: your other post, I'd be mildly surprised if Alias+Directory actually
> configures DAV:
> we conventionally use a <Location> ('cos DAV is a handler, not a map
> straight to
> the filesystem).  If you add a breadcrumb (e.g. a Header), do you see it
> in a PUT?
>
> --
> Nick Kew
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache allowed OPTIONS

Posted by Nick Kew <ni...@apache.org>.
> On 13 Jun 2018, at 17:18, Alex K <ri...@gmail.com> wrote:
> 
> 
> curl -sI -X OPTIONS http://169.254.254.55/webdav/
> 
> The PUT functions correctly if one tries to PUT a file but the issue is that it is not listed and this breaks the third party app as it is currently built. 

I doubt it.

I expect PUT to that URL returns 405.  The PUT that works for you is to a
different URL, of the form  http://169.254.254.55/webdav/some-file

Re: your other post, I'd be mildly surprised if Alias+Directory actually configures DAV:
we conventionally use a <Location> ('cos DAV is a handler, not a map straight to
the filesystem).  If you add a breadcrumb (e.g. a Header), do you see it in a PUT?

-- 
Nick Kew
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache allowed OPTIONS

Posted by Alex K <ri...@gmail.com>.
Hi,

Thanx for the below.
I tried this approach but still no luck.

I have the following at apache:

DavLockDB /var/www/DavLock

<VirtualHost *:80>
        DocumentRoot /var/www/html
        ServerAdmin webmaster@localhost

        <Directory /var/www/html/>
                Options Indexes FollowSymLinks MultiViews
                allow from all
        </Directory>

        Alias /webdav /var/www/html/webdav

        <Directory /var/www/html/webdav>
                AllowMethods PUT GET POST GET HEAD POST DELETE TRACE
PROPFIND PROPPATCH COPY MOVE LOCK UNLOCK OPTIONS
                AllowOverride All
                DAV On
                AuthType Basic
                AuthName "webdav"
                AuthUserFile /etc/apache2/.htpasswd
                Require valid-user
#               allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


Using cadaver client I am able to list, upload and delete files.

When checking with curl I still see the PUT method not advertised. Is this
normal that apache will never say it has PUT?

curl -sI -X OPTIONS http://169.254.254.55/webdav/
HTTP/1.1 200 OK
Date: Fri, 15 Jun 2018 01:40:29 GMT
Server: Apache/2.2.22 (Debian)
DAV: 1,2
DAV: <http://apache.org/dav/propset/fs/1>
MS-Author-Via: DAV
Allow:
OPTIONS,GET,HEAD,POST,DELETE,TRACE,PROPFIND,PROPPATCH,COPY,MOVE,LOCK,UNLOCK
Content-Length: 0
Content-Type: httpd/unix-directory


Thanx,
Alex

On Wed, Jun 13, 2018 at 11:08 PM, Yann Ylavic <yl...@gmail.com> wrote:

> On Wed, Jun 13, 2018 at 6:18 PM, Alex K <ri...@gmail.com> wrote:
> >
> > Is there any way to make apache list the PUT options as available?
>
> Probaly AllowMethods
> (https://httpd.apache.org/docs/current/en/mod/mod_
> allowmethods.html#allowmethods).
>
> Regards,
> Yann.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] Apache allowed OPTIONS

Posted by Yann Ylavic <yl...@gmail.com>.
On Wed, Jun 13, 2018 at 6:18 PM, Alex K <ri...@gmail.com> wrote:
>
> Is there any way to make apache list the PUT options as available?

Probaly AllowMethods
(https://httpd.apache.org/docs/current/en/mod/mod_allowmethods.html#allowmethods).

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org