From ecd63d89621d4d960575f0a9130570f3f06de48a Mon Sep 17 00:00:00 2001 From: IMAI Toshiyuki Date: Tue, 29 Dec 2009 01:31:59 +0900 Subject: [PATCH] bug fix: error on long multibyte post (twittering-start-http-ssl-session): add 'Expect: ' header field for avoiding '417 Expectation Failed' HTTP response error. See http://d.hatena.ne.jp/imait/20091228/1262004813 and http://www.escafrace.co.jp/blog/09/10/16/1008 --- ChangeLog | 4 ++++ twittering-mode.el | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 77f3815e..75726424 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 2009-12-29 Yuto Hayamizu * twittering-mode.el: load mule-ucs if needed (emacs21) + (twittering-start-http-ssl-session): add 'Expect: ' header field + for avoiding '417 Expectation Failed' HTTP response error. See + http://d.hatena.ne.jp/imait/20091228/1262004813 and + http://www.escafrace.co.jp/blog/09/10/16/1008 2009-12-28 Yuto Hayamizu diff --git a/twittering-mode.el b/twittering-mode.el index 5570486e..145ae7fd 100644 --- a/twittering-mode.el +++ b/twittering-mode.el @@ -630,6 +630,9 @@ Z70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv ;; TODO: use curl (let* ((request (twittering-make-http-request method headers host port path parameters)) + (headers (if (assoc "Expect" headers) + headers + (cons '("Expect" . "") headers))) (curl-args `("--include" "--silent" ,@(mapcan (lambda (pair)