0
我有:在DART重定向HTTP服务器请求,但uri.host是空白
server.listen((HttpRequest request) {
print(request.uri.toString());
if (request.uri.host == "woven.app") {
request.response.redirect(new Uri(scheme: 'http', host: 'woven.co',
path: request.uri.path, fragment: request.uri.fragment));
}
...
但2号线返回空白。按照笔记request.uri
:
* Returns the host part of the authority component.
*
* Returns the empty string if there is no authority component and
* hence no host.
UPDATE:这是本地和服务器的情况下,Chrome浏览器测试。