unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Downloadiong and file dates
@ 2010-01-04  2:07 Lennart Borgman
  2010-01-04 22:20 ` James Cloos
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman @ 2010-01-04  2:07 UTC (permalink / raw)
  To: Emacs-Devel devel

When downloading a file from Launchpad's repository's web interface
the downloaded file does not get the right modified/creation time.

The headers in a buffer downloaded with url-retrieve-synchronously says

HTTP/1.1 200 OK
Date: Mon, 04 Jan 2010 01:50:08 GMT
Server: PasteWSGIServer/0.5 Python/2.5.2
Content-Type: application/octet-stream
Content-Length: 13071
Content-Disposition: attachment; filename*=utf-8''foldit.el
Via: 1.1 bazaar.launchpad.net
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Language: el


The "Date" is obviously now when I tested. That seems correct. However
it would be good to have the modification time for the file too. There
is a "Last-Modified" header that perhaps could be used for this. Would
that be correct use for that header?

And how does url-copy-file handle this? This function has an argument
named `keep-time' but it is not easy to see where and how it is used.
From the doc string it looks liike it preserves the date of an old
local file.

Does url-copy-file take care of "Last-Modified" if present? Should it?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Downloadiong and file dates
  2010-01-04  2:07 Downloadiong and file dates Lennart Borgman
@ 2010-01-04 22:20 ` James Cloos
  2010-01-04 22:38   ` Lennart Borgman
  0 siblings, 1 reply; 4+ messages in thread
From: James Cloos @ 2010-01-04 22:20 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: Emacs-Devel devel

>>>>> "Lennart" == Lennart Borgman <lennart.borgman@gmail.com> writes:

Lennart> There is a "Last-Modified" header that perhaps could be used
Lennart> for this. Would that be correct use for that header?

Yes; that is exactly what most (every?) http client uses to set the
mtime on downloaded files.

Lennart> Does url-copy-file take care of "Last-Modified" if present? Should it?

It ought to.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Downloadiong and file dates
  2010-01-04 22:20 ` James Cloos
@ 2010-01-04 22:38   ` Lennart Borgman
  2010-01-04 22:56     ` Lennart Borgman
  0 siblings, 1 reply; 4+ messages in thread
From: Lennart Borgman @ 2010-01-04 22:38 UTC (permalink / raw)
  To: James Cloos; +Cc: Emacs-Devel devel

On Mon, Jan 4, 2010 at 11:20 PM, James Cloos <cloos@jhcloos.com> wrote:
>>>>>> "Lennart" == Lennart Borgman <lennart.borgman@gmail.com> writes:
>
> Lennart> There is a "Last-Modified" header that perhaps could be used
> Lennart> for this. Would that be correct use for that header?
>
> Yes; that is exactly what most (every?) http client uses to set the
> mtime on downloaded files.


Thanks James.


> Lennart> Does url-copy-file take care of "Last-Modified" if present? Should it?
>
> It ought to.


A simple test of file download from EmacsWiki which uses
"Last-Modified" for files shows that it does not.

So there are two bugs here, one at Launchpad (does not send
"Last-Modified") and one in Emacs (does not use "Last-Modified"). I
will try to report them.


> -JimC
> --
> James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Downloadiong and file dates
  2010-01-04 22:38   ` Lennart Borgman
@ 2010-01-04 22:56     ` Lennart Borgman
  0 siblings, 0 replies; 4+ messages in thread
From: Lennart Borgman @ 2010-01-04 22:56 UTC (permalink / raw)
  To: James Cloos; +Cc: Emacs-Devel devel

On Mon, Jan 4, 2010 at 11:38 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Mon, Jan 4, 2010 at 11:20 PM, James Cloos <cloos@jhcloos.com> wrote:
>>>>>>> "Lennart" == Lennart Borgman <lennart.borgman@gmail.com> writes:
>>
>> Lennart> There is a "Last-Modified" header that perhaps could be used
>> Lennart> for this. Would that be correct use for that header?
>>
>> Yes; that is exactly what most (every?) http client uses to set the
>> mtime on downloaded files.
>
>
> Thanks James.
>
>
>> Lennart> Does url-copy-file take care of "Last-Modified" if present? Should it?
>>
>> It ought to.
>
>
> A simple test of file download from EmacsWiki which uses
> "Last-Modified" for files shows that it does not.
>
> So there are two bugs here, one at Launchpad (does not send
> "Last-Modified") and one in Emacs (does not use "Last-Modified"). I
> will try to report them.


The Launchpad bug report is here:

    https://bugs.launchpad.net/launchpad/+bug/503144


>> -JimC
>> --
>> James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6
>>
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-04 22:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04  2:07 Downloadiong and file dates Lennart Borgman
2010-01-04 22:20 ` James Cloos
2010-01-04 22:38   ` Lennart Borgman
2010-01-04 22:56     ` Lennart Borgman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).