[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help with URL module needed
From: |
Mark A. Hershberger |
Subject: |
Re: help with URL module needed |
Date: |
Tue, 30 Nov 2004 12:18:57 -0500 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
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 <http://www.winterspeak.com/>
pgpbXbKQqabk9.pgp
Description: PGP signature
- Re: help with URL module needed, (continued)
- Re: help with URL module needed, Andreas Schwab, 2004/11/28
- Re: help with URL module needed, Paul Pogonyshev, 2004/11/28
- Re: help with URL module needed, Alex Schroeder, 2004/11/28
- Re: help with URL module needed, Andreas Schwab, 2004/11/28
- Re: help with URL module needed, Paul Pogonyshev, 2004/11/29
- Re: help with URL module needed, Paul Pogonyshev, 2004/11/30
- Re: help with URL module needed, Andreas Schwab, 2004/11/30
- Re: help with URL module needed, Thien-Thi Nguyen, 2004/11/29
- Re: help with URL module needed, Andreas Schwab, 2004/11/29
- Re: help with URL module needed, Thien-Thi Nguyen, 2004/11/30
- Re: help with URL module needed,
Mark A. Hershberger <=
Re: help with URL module needed, Thien-Thi Nguyen, 2004/11/26