Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(200)

Issue 11299228: Add HttpsServer class and test. (Closed)

Created:
8 years ago by Bill Hesse
Modified:
8 years ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add HttpsServer class and test. BUG=dart:3593 Committed: https://code.google.com/p/dart/source/detail?r=15452

Patch Set 1 #

Patch Set 2 : Add comments. #

Total comments: 2

Patch Set 3 : Adress comment #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -25 lines) Patch
M sdk/lib/io/http.dart View 1 2 2 chunks +16 lines, -3 lines 2 comments Download
M sdk/lib/io/http_impl.dart View 1 2 2 chunks +31 lines, -7 lines 1 comment Download
A + tests/standalone/io/https_server_test.dart View 3 chunks +23 lines, -15 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Bill Hesse
8 years ago (2012-11-28 13:04:45 UTC) #1
Søren Gjesse
lgtm https://codereview.chromium.org/11299228/diff/2001/sdk/lib/io/http_impl.dart File sdk/lib/io/http_impl.dart (right): https://codereview.chromium.org/11299228/diff/2001/sdk/lib/io/http_impl.dart#newcode954 sdk/lib/io/http_impl.dart:954: void listenOn(ServerSocket serverSocket) { We should check that ...
8 years ago (2012-11-28 15:21:49 UTC) #2
Bill Hesse
https://codereview.chromium.org/11299228/diff/2001/sdk/lib/io/http_impl.dart File sdk/lib/io/http_impl.dart (right): https://codereview.chromium.org/11299228/diff/2001/sdk/lib/io/http_impl.dart#newcode954 sdk/lib/io/http_impl.dart:954: void listenOn(ServerSocket serverSocket) { On 2012/11/28 15:21:49, Søren Gjesse ...
8 years ago (2012-11-28 15:39:40 UTC) #3
Mads Ager (google)
8 years ago (2012-11-29 09:45:24 UTC) #4
Message was sent while issue was closed.
This is good as a start, but I think we should split out the abstract classes so
that there is an HTTPS-specific listen method. We should probably have a
HTTPS-specific listenOn method as well that has the right type (SecureSocket)
for the socket so the editor and checked mode can help check the code.

https://codereview.chromium.org/11299228/diff/6001/sdk/lib/io/http.dart
File sdk/lib/io/http.dart (right):

https://codereview.chromium.org/11299228/diff/6001/sdk/lib/io/http.dart#newco...
sdk/lib/io/http.dart:71: void listen(String host,
When we are splitting out the abstract classes I don't think it makes sense to
have a certificate_name in this interface.

Can we split this out so that there is an HttpServerBase that has everything
that is shared. Then HttpServer implements HttpServerBase and has the listen
method without the certificate_name and HttpsServer has the listen method with
the certificate_name (as a required parameter?).

https://codereview.chromium.org/11299228/diff/6001/sdk/lib/io/http.dart#newco...
sdk/lib/io/http.dart:74: String certificate_name});
I would indent this line by one more char, but that is personal style:

{int backlog: 128
 String certificate_name});

https://codereview.chromium.org/11299228/diff/6001/sdk/lib/io/http_impl.dart
File sdk/lib/io/http_impl.dart (right):

https://codereview.chromium.org/11299228/diff/6001/sdk/lib/io/http_impl.dart#...
sdk/lib/io/http_impl.dart:931: class _HttpServer implements HttpServer,
HttpsServer {
Similarly here in the implementation. It might be nice to have a base class for
the shared functionality and have separate listen and listenOn methods.

Powered by Google App Engine
This is Rietveld 408576698