Skip to content

Commit

Permalink
`twittering-http-default-sentinel' confirms validity of the header.
Browse files Browse the repository at this point in the history
* twittering-mode.el (twittering-get-response-header): return nil
if an empty line as a separater is not found in the given buffer.
(twittering-http-default-sentinel): generate `header-info' only if
`header' is non-nil.
  • Loading branch information
cvmat committed Mar 29, 2010
1 parent 4acfffc commit 80cfd8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
2010-03-30 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-get-response-header): return nil
if an empty line as a separater is not found in the given buffer.
(twittering-http-default-sentinel): generate `header-info' only if
`header' is non-nil.

2010-03-29 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-url-wrapper): new wrapper
Expand Down
5 changes: 3 additions & 2 deletions twittering-mode.el
Expand Up @@ -2051,7 +2051,8 @@ Available keywords:
((memq status '(exit signal closed failed))
(unwind-protect
(let* ((header (twittering-get-response-header temp-buffer))
(header-info (twittering-update-server-info header)))
(header-info
(and header (twittering-update-server-info header))))
(setq mes
(cond
((null header-info)
Expand Down Expand Up @@ -2181,7 +2182,7 @@ BUFFER may be a buffer or the name of an existing buffer which contains the HTTP
(delete-region (point-min) (point)))
(if (search-forward-regexp "\r?\n\r?\n" nil t)
(buffer-substring (point-min) (match-end 0))
(error "Failure: invalid HTTP response")))))
nil))))

(defun twittering-get-response-body (buffer &optional func)
"Exract HTTP response body from HTTP response.
Expand Down

0 comments on commit 80cfd8b

Please sign in to comment.