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

Issue 897323002: Add support for user info on ws: and wss: URLs (Closed)

Created:
5 years, 10 months ago by Søren Gjesse
Modified:
5 years, 10 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add support for user info on ws: and wss: URLs BUG=http://dartbug.com/22152 R=kustermann@google.com, lrn@google.com Committed: https://code.google.com/p/dart/source/detail?r=43586

Patch Set 1 #

Total comments: 8

Patch Set 2 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -6 lines) Patch
M sdk/lib/io/websocket.dart View 1 chunk +3 lines, -0 lines 0 comments Download
M sdk/lib/io/websocket_impl.dart View 1 2 chunks +7 lines, -3 lines 0 comments Download
M tests/standalone/io/web_socket_test.dart View 1 4 chunks +36 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Søren Gjesse
5 years, 10 months ago (2015-02-05 18:17:46 UTC) #1
kustermann
lgtm https://codereview.chromium.org/897323002/diff/1/sdk/lib/io/websocket_impl.dart File sdk/lib/io/websocket_impl.dart (right): https://codereview.chromium.org/897323002/diff/1/sdk/lib/io/websocket_impl.dart#newcode815 sdk/lib/io/websocket_impl.dart:815: } Maybe move this before the `if (headers ...
5 years, 10 months ago (2015-02-06 13:13:46 UTC) #2
Søren Gjesse
Committed patchset #2 (id:20001) manually as 43586 (presubmit successful).
5 years, 10 months ago (2015-02-09 09:18:02 UTC) #4
Søren Gjesse
5 years, 10 months ago (2015-02-09 10:39:00 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/897323002/diff/1/sdk/lib/io/websocket_impl.dart
File sdk/lib/io/websocket_impl.dart (right):

https://codereview.chromium.org/897323002/diff/1/sdk/lib/io/websocket_impl.da...
sdk/lib/io/websocket_impl.dart:815: }
On 2015/02/06 13:13:46, kustermann wrote:
> Maybe move this before the `if (headers != null) {...}`, so users the
`headers`
> setting can potentially override the userinfo one?

Good point, done.

https://codereview.chromium.org/897323002/diff/1/tests/standalone/io/web_sock...
File tests/standalone/io/web_socket_test.dart (right):

https://codereview.chromium.org/897323002/diff/1/tests/standalone/io/web_sock...
tests/standalone/io/web_socket_test.dart:482: webSocket.add("Hello");
On 2015/02/06 13:13:46, kustermann wrote:
> Why do you close inside listen and add one line after?
> 
> Maybe
> 
> webSocket.drain();
> webSocket
>   ..add('Hello')
>   ..close();

This test just sends "Hello" back, but no data is send from the other side. So
the onData in listen is never called, and the close is dead code. Changed onData
to throw, and added asyncEnd to onDone (after adding one more asyncStart().

https://codereview.chromium.org/897323002/diff/1/tests/standalone/io/web_sock...
tests/standalone/io/web_socket_test.dart:491: websocket.close();
On 2015/02/06 13:13:46, kustermann wrote:
> -> `return websocket.close()` 

Why? The future is the asFuture on the stream subscription which is unrelated to
the return value from the onData closure.

https://codereview.chromium.org/897323002/diff/1/tests/standalone/io/web_sock...
tests/standalone/io/web_socket_test.dart:494: server.close();
On 2015/02/06 13:13:46, kustermann wrote:
> -> `return server.close();`
> 
> before asyncEnd()

Done. Moved asyncEnd to whenComplete.

Powered by Google App Engine
This is Rietveld 408576698