Skip to content
Browse files

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.
  • Loading branch information...
1 parent c82e17c commit 7c066fb292d3bfd71ce88cb06d72a48e8d50d7dd Alex Bennée committed Sep 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 servers/edit-server.el
4 servers/edit-server.el
@@ -373,12 +373,12 @@ non-nil, then STRING is also echoed to the message line."
;; look for "x-url" header
(goto-char (point-min))
- (when (re-search-forward "^x-url: .*/\\{2,3\\}\\(.*\\)
+ (when (re-search-forward "^x-url: .*/\\{2,3\\}\\([^?\r\n
]+\\)" nil t)
(setq edit-server-url (match-string 1))))
;; look for "x-file" header
- (goto-char (point-min))
+ (goto-char (point-min))
(when (re-search-forward "^x-file: \\([^?\r\n
]+\\)" nil t)
(edit-server-log proc "Found x-file: %s" (match-string 1))

0 comments on commit 7c066fb

Please sign in to comment.
Something went wrong with that request. Please try again.