diff options
| author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-23 23:38:06 -0200 |
|---|---|---|
| committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-01-24 00:56:08 -0200 |
| commit | 4bc72b0f622b2565e7b0d0263bb3053ca5252f63 (patch) | |
| tree | 255cd97d2678ebc15feb11721138214f06f16c3b | |
| parent | 9bd67acab3c4c81cf4bad14b2da8be835ae086e0 (diff) | |
sx-request-get-url error unless code 200
| -rw-r--r-- | sx-request.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sx-request.el b/sx-request.el index 77ae1d7..7f18a2b 100644 --- a/sx-request.el +++ b/sx-request.el @@ -234,9 +234,10 @@ Currently returns nil." (with-current-buffer response-buffer (progn (goto-char (point-min)) + (unless (string-match "200" (thing-at-point 'line)) + (error "Page not found.")) (if (not (search-forward "\n\n" nil t)) (error "Headers missing; response corrupt") - (when (looking-at-p "Not Found") (error "Page not found.")) (prog1 (buffer-substring (point) (point-max)) (kill-buffer (current-buffer))))))))) |
