Mercurial Hosting > luan
comparison src/luan/webserver/handlers/DomainHandler.java @ 1331:02fe660e7748
minor fix
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 11 Feb 2019 02:17:41 -0700 |
parents | 5763597ca5c0 |
children | 8b61c8c4e07a |
comparison
equal
deleted
inserted
replaced
1330:f41919741100 | 1331:02fe660e7748 |
---|---|
69 this.factory = factory; | 69 this.factory = factory; |
70 } | 70 } |
71 | 71 |
72 public Response handle(Request request) { | 72 public Response handle(Request request) { |
73 String host = (String)request.headers.get("host"); | 73 String host = (String)request.headers.get("host"); |
74 if( host == null ) | |
75 return null; | |
74 int i = host.indexOf(':'); | 76 int i = host.indexOf(':'); |
75 String domain = i == -1 ? host : host.substring(0,i); | 77 String domain = i == -1 ? host : host.substring(0,i); |
76 Handler handler = getHandler(domain); | 78 Handler handler = getHandler(domain); |
77 return handler==null ? null : handler.handle(request); | 79 return handler==null ? null : handler.handle(request); |
78 } | 80 } |