[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/xml-rpc cd88a4f5fa 16/64: (xml-rpc-xml-list-to-value): Han
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/xml-rpc cd88a4f5fa 16/64: (xml-rpc-xml-list-to-value): Handle nil for an int gracefully. Consolidate dateTime parsing. (xml-rpc-datetime-to-string): Wordpress expects dateTime elements to match the XML-RPC spec and not ISO8601 spec. (xml-rpc-value-to-xml-list): Switch to iso8601 for default. |
Date: |
Fri, 31 Dec 2021 20:10:59 -0500 (EST) |
branch: elpa/xml-rpc
commit cd88a4f5fa4c8053e179dfcbbaf1570575777675
Author: Mark A. Hershberger <mah@everybody.org>
Commit: Mark A. Hershberger <mah@everybody.org>
(xml-rpc-xml-list-to-value): Handle nil for an int gracefully. Consolidate
dateTime parsing. (xml-rpc-datetime-to-string): Wordpress expects dateTime
elements to match the XML-RPC spec and not ISO8601 spec.
(xml-rpc-value-to-xml-list): Switch to iso8601 for default.
---
xml-rpc.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/xml-rpc.el b/xml-rpc.el
index df5a2054a8..da2a8ca99c 100644
--- a/xml-rpc.el
+++ b/xml-rpc.el
@@ -8,12 +8,12 @@
;; Author: Mark A. Hershberger <mah@everybody.org>
;; Original Author: Daniel Lundin <daniel@codefactory.se>
-;; Version: 1.6.5.1
+;; Version: 1.6.6
;; Created: May 13 2001
;; Keywords: xml rpc network
;; URL: http://emacswiki.org/emacs/xml-rpc.el
;; Maintained-at: http://savannah.nongnu.org/bzr/?group=emacsweblogs
-;; Last Modified: <2009-09-09 21:09:47 mah>
+;; Last Modified: <2009-09-13 01:58:08 mah>
;; This file is NOT (yet) part of GNU Emacs.
@@ -114,6 +114,8 @@
;;; History:
+;; 1.6.6 - Use the correct dateTime elements. Fix bug in parsing null int.
+
;; 1.6.5.1 - Fix compile time warnings.
;; 1.6.5 - Made handling of dateTime elements more robust.
@@ -170,7 +172,7 @@
(eval-when-compile
(require 'cl))
-(defconst xml-rpc-version "1.6.5.1"
+(defconst xml-rpc-version "1.6.6"
"Current Version of xml-rpc.el")
(defcustom xml-rpc-load-hook nil
@@ -289,7 +291,7 @@ interpreting and simplifying it while retaining its
structure."
valvalue)
;; Integer
((or (eq valtype 'int) (eq valtype 'i4))
- (string-to-number valvalue))
+ (string-to-number (or valvalue "0")))
;; Double/float
((eq valtype 'double)
(string-to-number valvalue))
@@ -307,9 +309,8 @@ interpreting and simplifying it while retaining its
structure."
(fault-code (cdr (assoc "faultCode" struct))))
(list 'fault fault-code fault-string)))
;; DateTime
- ((eq valtype 'dateTime.iso8601)
- (list :datetime (date-to-time valvalue)))
- ((eq valtype 'dateTime)
+ ((or (eq valtype 'dateTime.iso8601)
+ (eq valtype 'dateTime))
(list :datetime (date-to-time valvalue)))
;; Array
((eq valtype 'array)
@@ -326,7 +327,7 @@ interpreting and simplifying it while retaining its
structure."
(defun xml-rpc-datetime-to-string (value)
"Convert a date time to a valid XML-RPC date"
- (format-time-string "%Y%m%dT%H%M%S%z" (cadr value)))
+ (format-time-string "%Y%m%dT%H:%M:%S" (cadr value)))
(defun xml-rpc-value-to-xml-list (value)
"Return XML representation of VALUE properly formatted for use with the \
@@ -338,7 +339,7 @@ functions in xml.el."
`((value nil (boolean nil ,(xml-rpc-boolean-to-string value)))))
;; Date
((xml-rpc-value-datetimep value)
- `((value nil (dateTime nil ,(xml-rpc-datetime-to-string value)))))
+ `((value nil (dateTime.iso8601 nil ,(xml-rpc-datetime-to-string value)))))
;; list
((xml-rpc-value-arrayp value)
(let ((result nil)
- [nongnu] elpa/xml-rpc bc331d010b 56/64: Test CI, (continued)
- [nongnu] elpa/xml-rpc bc331d010b 56/64: Test CI, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 9fa979302b 63/64: Merge pull request #17 from xml-rpc-el/ci, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 7b4d6c4820 04/64: Update copyright. (xml-rpc-response-errorp): make safe., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 4efc188b7f 53/64: Merge pull request #13 from skangas/version-number, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc a190759da8 41/64: Merge pull request #2 from mdorman/master, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 7bcf1427b7 07/64: (xml-rpc-value-datep): New function to determine if a string is an ISO date. (xml-rpc-value-to-xml-list): Add support for vector inputs. Add support for strings that are really dates., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc bfa3f97259 09/64: Clean up long lines, address bugs, use string-to-number instead of obsolete string-to-int., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 417f3d2a94 12/64: (xml-entity-alist): provide a definition for really old versions of xml.el. (xml-rpc-use-coding-system): Make unicode variables dependent on the existence of utf-8 coding-system. Generally allow use of Emacs that don't understand Unicode -- although the HTTP headers still claim to be UTF-8. Update backwards-compatibility code after testing against XEmacs21., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 725bc20829 14/64: Bump the version. (xml-rpc-fault-string, xml-rpc-fault-code): Defvar some previously un-declared vars. (xml-rpc-value-intp, xml-rpc-value-doublep) (xml-rpc-value-stringp): Change from defun to defsubst for consistency. (xml-rpc-request, xml-rpc-list-to-value, xml-rpc-clean): Fix compilation warnings, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 68d54c3c0f 11/64: (xml-rpc-xml-list-to-value): Make sure XML-RPC's dateTime.iso8601 is handled. (xml-rpc-datetime-to-string): Grab the right piece of data. (xml-rpc-request-process-buffer): Kill buffer if not debugging. (timezone-parse-date): Conditionally override if the version we have can't handle iso8601 basic format., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc cd88a4f5fa 16/64: (xml-rpc-xml-list-to-value): Handle nil for an int gracefully. Consolidate dateTime parsing. (xml-rpc-datetime-to-string): Wordpress expects dateTime elements to match the XML-RPC spec and not ISO8601 spec. (xml-rpc-value-to-xml-list): Switch to iso8601 for default.,
Stefan Kangas <=
- [nongnu] elpa/xml-rpc d3d4460ec9 15/64: typo, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 28dfbff291 18/64: Add submit-bug function and mode toggling functionality., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 481ed72dff 22/64: update bug reporting function., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc c20aa6359a 29/64: bump version for continued development, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 25c380cab0 28/64: Update release notes, tag 1.6.8, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 3b4ac0ebf2 24/64: update urls, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 4b21d27d35 25/64: Eliminate xemacs compile warning, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 643bbfb5da 30/64: * Apply link from http://rix3.8.je/2009/12/15/emacs%E7%9A%84weblogger1-4-4%E7%9A%84wordpress-patch/, Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc 79e74a969d 21/64: Some minor housekeeping, bump xml-rpc.el version., Stefan Kangas, 2021/12/31
- [nongnu] elpa/xml-rpc f862301b46 27/64: connection close! connection close!, Stefan Kangas, 2021/12/31