emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: more url-utils?


From: Julien Danjou
Subject: Re: more url-utils?
Date: Mon, 16 May 2011 21:52:43 +0200
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux)

On Mon, May 16 2011, Ted Zlatanov wrote:

> I'm trying to avoid that approach: we just established the headers are
> almost never necessary in the buffer.  So we should not ask the API
> users to do anything extra to remove them.

That can be true. When you fetch an URL, you want to know if the fetch
result is a 200 OK or a 404 Not Found. That's the absolute minimum thing
you want to do if you plan to write correct code.
So just dropping the header sounds like a very bad programming practice,
and not something I'd encourage.

I wrote code with url.el. And what I always did is (search-forward
"\n\n") to move point between headers and content, and then parse the
headers to at least check the return code (expecting 200 usually).

I often also needed the Content-Type (so clearly an alist of parsed
headers would be welcome).

-- 
Julien Danjou
❱ http://julien.danjou.info

Attachment: pgpYl8w88RV2X.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]