Repository: bokeh/bokeh

Issue:
notebook_url="*" fails in show()
#### ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)
 - OS - Client is a Mac the server is a RHEL
 - Browser - Chrome 61.0.3163.100
 - Bokeh - 0.12.9
 - Python - 3.5
 - Jupyter notebook - 6.1.0

#### Description of expected behavior and the observed behavior
`notebook_url="*"` does not seem to work. I was expecting that if I use * I would not need to specify the notebook_url at all, but giving * gives me a error in the chrome console.


#### Complete, minimal, self-contained example code that reproduces the issue

I'm running: https://github.com/bokeh/bokeh/blob/e701d301504a258ff447e8a17ddbb09637231fac/examples/howto/server_embed/notebook_embed.ipynb 


#### Stack traceback and/or browser JavaScript console output

When running: `show(app)`, I get the following in JS console:
```
GET http://localhost:44602/autoload.js?bokeh-autoload-element=7694aee3-80ba-4db2-a3ec-3861ae2a5521&bokeh-app-path=/&bokeh-absolute-url=http://localhost:44602 net::ERR_CONNECTION_REFUSED
```
Which is expected as default value is localhost, and I am hosting it on a web server.

When running: `show(app, notebook_url="myip:myport")` (with appropriate values for ip/port it works!

When running: `show(app, notebook_url="*")`, I get the following in JS console:
```
GET http://%2A:37016/autoload.js?bokeh-autoload-element=3a056287-4e60-407c-9134-74a9df5f14d5&bokeh-app-path=/&bokeh-absolute-url=http://*:37016 net::ERR_NAME_NOT_RESOLVED
```
Which is not expected as the docs state:
```
It is also possible to pass ``notebook_url="*"`` to disable the
standard checks, so that applications will display regardless of
the current notebook location
```



Discussion:
@AbdealiJK in the code above you say you are trying `show(app="*")`, but this is never correct, and not what the docs state. Do you mean `show(app, notebook_url="*")` ? If so, what happens with `notebook_url="*:*"` or `notebook_url="myip:*"` ?

Edit: please try with `0.12.10`, there is only currently one line of development and releases, we do not have the capacity to to branches off previous releases. 
Here is my report on trying out more things:
#### 1. `myip:myport`
Works!

#### 2. `myip:*`
Gives warning and error:
```python
bokeh/server/util.py in create_hosts_whitelist(host_list, port)
    119             try:
--> 120                 int(parts[1])
    121             except ValueError:

ValueError: invalid literal for int() with base 10: '*'
```

#### 3. `*:myport`
Gives warning and no output/error

#### 4. `*:*`
Gives warning and error:
```python
bokeh/server/util.py in create_hosts_whitelist(host_list, port)
    119             try:
--> 120                 int(parts[1])
    121             except ValueError:

ValueError: invalid literal for int() with base 10: '*'
```

#### 5. `*`
Gives warning and no output/error

OK, the proximate problem is that 
```
url = _server_url(notebook_url, server.port)
```
returns things like `http://*:56417/` when `notebook_url="*"`, and then the ultimate problem is that we are trying to use `notebook_url` both to specify the server URL, and the allowed origin and I'm not sure that's feasible. 

In general I am not sure there's a robust way to make it work without just needing the specify the complete URL. We could split `notebook_url` into two parameters, but *one* of them would still need to have the URL to server in it. But the jupyter folks are not willing to provide a supported API for obtaining the server URL (see, e.g. [this thread](https://groups.google.com/forum/#!topic/jupyter/7tQOGKqeov8)), so it will always be forced upon users to supply it. I think that's unfortunate, but there's nothing we can do about it.  My inclination at this point is simply to remove that line from the docs. 

Resolving patch:
diff --git a/bokeh/io/showing.py b/bokeh/io/showing.py
--- a/bokeh/io/showing.py
+++ b/bokeh/io/showing.py
@@ -93,16 +93,11 @@ def show(obj, browser=None, new="tab", notebook_handle=False, notebook_url="loca
             properly. If no protocol is supplied in the URL, e.g. if it is
             of the form "localhost:8888", then "http" will be used.
 
-            It is also possible to pass ``notebook_url="*"`` to disable the
-            standard checks, so that applications will display regardless of
-            the current notebook location, however a warning will appear.
-
-            notebook_url can also be a function that takes one int for the
+            ``notebook_url`` can also be a function that takes one int for the
             bound server port.  If the port is provided, the function needs
             to generate the full public URL to the bokeh server.  If None
             is passed, the function is to generate the origin URL.
 
-
     Some parameters are only useful when certain output modes are active:
 
     * The ``browser`` and ``new`` parameters only apply when ``output_file``


Test patch: