Skip to content

Commit

Permalink
Remove redundant pre-processing of buffer for SSL via a proxy.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Remove redundant pre-processing of HTTP
response buffer for SSL via a proxy.
(twittering-oauth-get-response-alist): remove redundant
pre-processing of HTTP response buffer for SSL via proxy. Instead
of it, `twittering-oauth-get-token-alist' invokes an appropriate
function for pre-processing.
  • Loading branch information
cvmat committed Sep 26, 2010
1 parent 561df27 commit 3d7dd6e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -1,3 +1,12 @@
2010-09-26 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Remove redundant pre-processing of HTTP
response buffer for SSL via a proxy.
(twittering-oauth-get-response-alist): remove redundant
pre-processing of HTTP response buffer for SSL via proxy. Instead
of it, `twittering-oauth-get-token-alist' invokes an appropriate
function for pre-processing.

2010-09-19 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Fix `twittering-push-uri-onto-kill-ring'.
Expand Down
17 changes: 0 additions & 17 deletions twittering-mode.el
Expand Up @@ -1112,23 +1112,6 @@ function."
(defun twittering-oauth-get-response-alist (buffer)
(with-current-buffer buffer
(goto-char (point-min))
(when (and twittering-proxy-use twittering-oauth-use-ssl)
;; When using SSL via a proxy with CONNECT method,
;; omit a successful HTTP response and headers if they seem to be
;; sent from the proxy.
(save-excursion
(goto-char (point-min))
(let ((first-regexp
;; successful HTTP response
"\\`HTTP/1\.[01] 2[0-9][0-9] .*?\r?\n")
(next-regexp
;; following HTTP response
"^\\(\r?\n\\)HTTP/1\.[01] [0-9][0-9][0-9] .*?\r?\n"))
(when (and (search-forward-regexp first-regexp nil t)
(search-forward-regexp next-regexp nil t))
(let ((beg (point-min))
(end (match-end 1)))
(delete-region beg end))))))
(when (search-forward-regexp
"\\`\\(\\(HTTP/1\.[01]\\) \\([0-9][0-9][0-9]\\) \\(.*?\\)\\)\r?\n"
nil t)
Expand Down

0 comments on commit 3d7dd6e

Please sign in to comment.