Merge pull request #3594 from Jessonsotoventura/open_editor

Edit URLs in external editor
This commit is contained in:
Thomas Kriechbaumer 2019-09-28 13:31:29 +02:00 committed by GitHub
commit bb356d89e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -441,7 +441,12 @@ class ConsoleAddon:
message.content = c.rstrip(b"\n")
elif part == "set-cookies":
self.master.switch_view("edit_focus_setcookies")
elif part in ["url", "method", "status_code", "reason"]:
elif part == "url":
url = flow.request.url.encode()
edited_url = self.master.spawn_editor(url)
url = edited_url.rstrip(b"\n")
flow.request.url = url.decode()
elif part in ["method", "status_code", "reason"]:
self.master.commands.execute(
"console.command flow.set @focus %s " % part
)