GNU bug report logs - #18290
24.3.93; url-http-parse-headers not handling 301 responses to PROPFIND

Previous Next

Package: emacs;

Reported by: Alexis <flexibeast <at> gmail.com>

Date: Mon, 18 Aug 2014 09:05:02 UTC

Severity: normal

Found in version 24.3.93

Done: Nicolas Petton <nicolas <at> petton.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alexis <flexibeast <at> gmail.com>
Cc: 18290 <at> debbugs.gnu.org
Subject: bug#18290: 24.3.93; url-http-parse-headers not handling 301 responses to PROPFIND
Date: Fri, 25 Dec 2015 20:41:33 +0100
Alexis <flexibeast <at> gmail.com> writes:

> In url-http.el, a comment states:
>
> ;; If the 301|302 status code is received in response to a request other
> ;; than GET or HEAD, the user agent MUST NOT automatically redirect the
> ;; request unless it can be confirmed by the user, since this might
> ;; change the conditions under which the request was issued.
>
> Thus, only responses to the HEAD and GET methods are handled. A 301
> response to a PROPFIND request, such as Google provides as part of its
> CardDAV API, is not handled, with the result that the gzip'd response
> body provided by Google is not decompressed, and cannot be further
> processed by the url-dav library.
>
> It seems to me that RFC2616 has been superseded in this regard by
> RFC4918, which states, in section 9.1.2:
>
> "In PROPFIND responses, information about individual properties is
> returned inside 'propstat' elements (see Section 14.22), each containing
> an individual 'status' element containing information about the
> properties appearing in it.  The list below summarizes the most common
> status codes used inside 'propstat'; however, clients should be prepared
> to handle other 2/3/4/5xx series status codes as well."
>
> Further, RFC4918 section 12 states:
>
> "In general, many HTTP status codes can be used in response to any
> request, not just in cases described in this document.  Note also that
> WebDAV servers are known to use 300-level redirect responses (and early
> interoperability tests found clients unprepared to see those
> responses)."
>
> This suggests that url-http should be modified to handle 301 responses
> to PROPFIND, in addition to HEAD and GET.

I think you're right, and the code should be changed as you describe.
However, I don't have access to anything that requires PROPFIND, so it's
a bit difficult for me to test.  Could you create a patch for this, and
then I'll apply it?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 9 years and 160 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.