Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: relayd: http protocol not supporting some http methods

7 views
Skip to first unread message

Michael Lechtermann

unread,
Jul 26, 2016, 8:29:57 AM7/26/16
to
Hu Paul,

the attached patch doesn't change anything for me. WebDAV still isn't working through relayd.

# svn up
svn: Server sent unexpected return value (400 Bad Request) in response to OPTIONS request for 'https://www.<censored>.<tld>/svn/repo'

Regards,
Michael

> Paul Fariello <pa...@fariello.eu> hat am 27. Juni 2016 um 21:19 geschrieben:
>
>
> Hi,
>
> here is an updated patch adding support for WebDAV Versioning Extensions
> RFC3253.
>
> Regards,
> Paul
>
> On Mon, Jun 27, 2016 at 09:35:20AM +0200, Paul Fariello wrote:
> > Hi,
> >
> > I've encountered the exact same issue. I think this is due to a miss
> > handling of message-body.
> >
> > RFC2616 states in chapter 4.3 that:
> >
> > > The presence of a message-body in a request is signaled by the
> > > inclusion of a Content-Length or Transfer-Encoding header field in
> > > the request's message-headers. A message-body MUST NOT be included in
> > > a request if the specification of the request method (section 5.1.1)
> > > does not allow sending an entity-body in requests. A server SHOULD
> > > read and forward a message-body on any request; if the request method
> > > does not include defined semantics for an entity-body, then the
> > > message-body SHOULD be ignored when handling the request.
> > >
> >
> > Thus we should not ignore message-body for unknown methods by forcing
> > cre->toread to TOREAD_HTTP_HEADER.
> >
> > Please find attached a patch that just allow http request to have a
> > message-body whatever the method is.
> >
> > Regards,
> > Paul
> >
> > > 2016-06-24 11:01:03
> > > <re...@openbsd.org>:
> > >
> > > Hi,
> > >
> > > thanks, this is the second report regarding WebDAV since yesterday. I'll
> > > have a look \
> > > at this when I'm back home next week.
> > >
> > > Reyk
> > >
> > > > Am 24.06.2016 um 09:21 schrieb Michael Lechtermann
> > > > <mic...@lechtermann.net>:
> > > >
> > > > Hi,
> > > >
> > > > I have recently configured relayd as SSL accelerator and it is working
> > > > really \
> > > > great. However it seems that not all http methods that are mentioned
> > > > in the man \
> > > > page are actually supported by the http protocol.
> > > > method name
> > > > Match the HTTP request method. The method is specified by name
> > > > and can be either CONNECT, COPY, DELETE, GET, HEAD, LOCK, MKCOL,
> > > > MOVE, OPTIONS, PATCH, POST, PROPFIND, PROPPATCH, PUT, TRACE, or
> > > > UNLOCK.
> > > >
> > > > The above list is from "man relayd.conf" and I would assume that those
> > > > methods, if \
> > > > mentioned, are fully supported, however when trying to use Apache2
> > > > with mod_dav_svn \
> > > > (ap2-subversion) relayd somehow breaks it:
> > > > # svn up
> > > > svn: Server sent unexpected return value (400 Bad Request) in response
> > > > to OPTIONS \
> > > > request for 'https://<url>/svn/repo'
> > > > This was tested using OpenBSD 5.9. If more information is required,
> > > > please say so.
> > > >
> > > > Regards,
> > > > Michael
> > > >
>
> > Index: relay_http.c
> > ===================================================================
> > RCS file: /cvs/src/usr.sbin/relayd/relay_http.c,v
> > retrieving revision 1.55
> > diff -r1.55 relay_http.c
> > 375a376
> > > default:
> > 385,389d385
> > < break;
> > < default:
> > < /* HTTP handler */
> > < cre->toread = TOREAD_HTTP_HEADER;
> > < bev->readcb = relay_read_http;
>
>
> --
> Paul Fariello
>
> PGP: 0x672CDD2031AAF49B

Paul Fariello

unread,
Jul 27, 2016, 3:55:56 AM7/27/16
to
Hi Michael,

Do you know which http method svn is using ?
Do you have some logs from relayd ?

Regards,
Paul

Stefan Sperling

unread,
Jul 27, 2016, 4:02:15 AM7/27/16
to
On Wed, Jul 27, 2016 at 09:55:24AM +0200, Paul Fariello wrote:
> Do you know which http method svn is using ?

See https://svn.apache.org/repos/asf/subversion/trunk/notes/http-and-webdav

Paul Fariello

unread,
Jul 27, 2016, 4:10:08 AM7/27/16
to
Thanks for the reference.

Michael Lechtermann

unread,
Jul 27, 2016, 4:11:44 AM7/27/16
to

> On 27Juli, 2016, at 09:55, Paul Fariello <pa...@fariello.eu> wrote:
>
> Do you have some logs from relayd ?

relayd is running with “-v”, but there is no log output regarding the failed http OPTIONS.

-Michael

Paul Fariello

unread,
Jul 27, 2016, 4:19:37 AM7/27/16
to
On Tue, Jul 26, 2016 at 02:29:26PM +0200, Michael Lechtermann wrote:
> Hu Paul,
>
> the attached patch doesn't change anything for me. WebDAV still isn't working through relayd.
>
> # svn up
> svn: Server sent unexpected return value (400 Bad Request) in response to OPTIONS request for 'https://www.<censored>.<tld>/svn/repo'

Missed this log. So it fails on OPTIONS method which is part of
HTTP/1.1, RFC 7231.

relayd logs and svn server log could really help.

I can't reproduce it since I don't have a working svn server.

>
> Regards,
> Michael

Michael Lechtermann

unread,
Jul 27, 2016, 5:08:51 AM7/27/16
to

> On 27Juli, 2016, at 10:19, Paul Fariello <pa...@fariello.eu> wrote:
>
> relayd logs and svn server log could really help.
>
> I can't reproduce it since I don't have a working svn server.

relayd doesn’t print out anything in regards to this, even when using -d and multiple -v

Apache also doesn’t recognize any incoming requests (from relayd), so no logs from that either.

- Michael

Paul Fariello

unread,
Jul 27, 2016, 5:26:58 AM7/27/16
to
Can you check if the http OPTIONS request has a body ? With tcpdump for
example.

Relayd considers it should not have one. But this kind of behavior
reminds me the issue I had with CalDav.
0 new messages