all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Alexis <flexibeast@gmail.com>
Cc: 18290@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	[thread overview]
Message-ID: <87mvsyuxhu.fsf@gnus.org> (raw)
In-Reply-To: <87wqa66ufd.fsf@gmail.com> (Alexis's message of "Mon, 18 Aug 2014 18:49:54 +1000")

Alexis <flexibeast@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





  parent reply	other threads:[~2015-12-25 19:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-18  8:49 bug#18290: 24.3.93; url-http-parse-headers not handling 301 responses to PROPFIND Alexis
2015-03-01  3:05 ` Alexis
2015-12-25 19:41 ` Lars Ingebrigtsen [this message]
2016-01-06  5:44   ` Alexis
2016-02-05  9:11     ` Nicolas Petton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvsyuxhu.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=18290@debbugs.gnu.org \
    --cc=flexibeast@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.