Since (length url-request-data) returns characters in the string instead of bytes, shouldn't it be (string-bytes url-request-data) instead? Additionally, what happens if you post using Unicode? Does the following patch help any? --- url-http.el 28 Nov 2004 19:13:50 -0000 1.6 +++ url-http.el 30 Nov 2004 17:16:09 -0000 @@ -259,7 +259,7 @@ (if url-request-data (concat "Content-length: " (number-to-string - (length url-request-data)) + (string-bytes url-request-data)) "\r\n")) ;; End request "\r\n" @@ -1060,6 +1060,9 @@ (set-process-buffer connection buffer) (set-process-sentinel connection 'url-http-end-of-document-sentinel) (set-process-filter connection 'url-http-generic-filter) + (set-process-coding-system connection + (detect-coding-string url-request-data t) + url-request-coding-system) (process-send-string connection (url-http-create-request url)))) buffer)) --- url-vars.el 19 Oct 2004 21:37:18 -0000 1.8 +++ url-vars.el 30 Nov 2004 17:16:09 -0000 @@ -218,6 +218,8 @@ (defvar url-request-data nil "Any data to send with the next request.") +(defvar url-request-coding-system 'binary "The coding system to use for the request.") + (defvar url-request-extra-headers nil "A list of extra headers to send with the next request. Should be an assoc list of headers/contents.") -- A choice between one man and a shovel, or a dozen men with teaspoons is clear to me, and I'm sure it is clear to you also. -- Zimran Ahmed