diff options
-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))))))))) |