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...
Alex Bennée
Alex Bennée committed Sep 27, 2012
1 parent c82e17c commit 7c066fb292d3bfd71ce88cb06d72a48e8d50d7dd
Showing with 2 additions and 2 deletions.
  1. +2 −2 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\\}\\(.*\\)" 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
(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

0 comments on commit 7c066fb

Please sign in to comment.