Преглед на файлове

edit-server.el: more fix-up of the URL parsing

It seems my attempt to parse to ^M was premature. The parsing needs to
handle both line-end cases as Chrome seems to randomly decide which
ones to put in the headers.
Alex Bennée преди 11 години
родител
ревизия
73ce9d118f
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      edit-server.el

+ 2 - 2
edit-server.el

@@ -373,12 +373,12 @@ non-nil, then STRING is also echoed to the message line."
       ;; look for "x-url" header
       (save-excursion
 	(goto-char (point-min))
-	(when (re-search-forward "^x-url: .*/\\{2,3\\}\\(.*\\)
" nil t)
+	(when (re-search-forward "^x-url: .*/\\{2,3\\}\\([^?\r\n
]+\\)" nil t)
 	  (setq edit-server-url (match-string 1))))
       ;; look for "x-file" header
       (save-excursion
 	(goto-char (point-min))
-	(when (re-search-forward "^x-file: \\(.*\\)
" nil t)
+	(when (re-search-forward "^x-file: \\([^?\r\n
]+\\)" nil t)
 	  (edit-server-log proc "Found x-file: %s" (match-string 1))
 	  (setq edit-server-file (match-string 1))))
       ;; look for head/body separator