1.1 --- a/MoinRemoteSupport.py Tue Apr 30 20:07:38 2013 +0200
1.2 +++ b/MoinRemoteSupport.py Wed May 01 15:48:18 2013 +0200
1.3 @@ -21,7 +21,11 @@
1.4 If the resource cannot be downloaded and cached, None is returned.
1.5 Otherwise, the form of the data is as follows:
1.6
1.7 - url <newline> content-type-header <newline> content-body
1.8 + url <newline>
1.9 + [ content-type-header ] <newline>
1.10 + [ other-header <newline> ]*
1.11 + <newline>
1.12 + content-body
1.13 """
1.14
1.15 # See if the URL is cached.
1.16 @@ -49,6 +53,10 @@
1.17 try:
1.18 cache_entry.write(url + "\n")
1.19 cache_entry.write((f.headers.get("content-type") or "") + "\n")
1.20 + for key, value in f.headers.items():
1.21 + if key.lower() != "content-type":
1.22 + cache_entry.write("%s: %s\n" % (key, value))
1.23 + cache_entry.write("\n")
1.24 cache_entry.write(f.read())
1.25 finally:
1.26 cache_entry.close()
2.1 --- a/README.txt Tue Apr 30 20:07:38 2013 +0200
2.2 +++ b/README.txt Wed May 01 15:48:18 2013 +0200
2.3 @@ -70,6 +70,8 @@
2.4 * Added macro argument parsing from MoinForms and a function to find parsers
2.5 by content type.
2.6 * Introduced support for reverse iteration over stored items.
2.7 + * Expanded the stored metadata for cached remote resources in
2.8 + MoinRemoteSupport.
2.9
2.10 New in MoinSupport 0.2 (Changes since MoinSupport 0.1)
2.11 ------------------------------------------------------