Skip to content

Commit

Permalink
Merge pull request #3 from SWI-Prolog/master
Browse files Browse the repository at this point in the history
PORT: Deal with 7.3.24 changes in http_server_property/2.
  • Loading branch information
TeamSPoon authored Jul 7, 2016
2 parents eee6eb9 + e093a82 commit 71487b0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ide.pl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
swish(Port) :-
http_server_property(Port, goal(swish_ide:http_dispatch)), !,
open_browser(Port).
swish(_:Port) :-
integer(Port),
http_server_property(Port, goal(swish_ide:http_dispatch)), !,
open_browser(Port).
swish(Port) :-
http_server(http_dispatch,
[ port(Port),
Expand All @@ -99,7 +103,7 @@

open_browser(Address) :-
host_port(Address, Host, Port),
http_server_property(Address, scheme(Scheme)),
http_server_property(Port, scheme(Scheme)),
http_absolute_location(root(.), Path, []),
format(atom(URL), '~w://~w:~w~w', [Scheme, Host, Port, Path]),
www_open_url(URL).
Expand Down

0 comments on commit 71487b0

Please sign in to comment.