Bug 199943 - [SOUP] WebSockets: add support for extensions when using web sockets libsoup API
Summary: [SOUP] WebSockets: add support for extensions when using web sockets libsoup API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 200162 200165
  Show dependency treegraph
 
Reported: 2019-07-19 07:42 PDT by Carlos Garcia Campos
Modified: 2019-08-01 07:22 PDT (History)
4 users (show)

See Also:


Attachments
WIP (8.33 KB, patch)
2019-07-19 07:44 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch (73.74 KB, patch)
2019-08-01 05:11 PDT, Carlos Garcia Campos
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2019-07-19 07:42:17 PDT
This still requires new API in libsoup, see https://gitlab.gnome.org/GNOME/libsoup/merge_requests/76
Comment 1 Carlos Garcia Campos 2019-07-19 07:44:03 PDT
Created attachment 374464 [details]
WIP
Comment 2 Carlos Garcia Campos 2019-07-19 08:20:00 PDT
Youenn, do we have a "formal" way of importing blink tests? I want to use the permessage-deflate tests from blink. Importing them in imported/blink would not work for websocket tests, so it would be easier to just copy them to our websocket tests directory.
Comment 3 youenn fablet 2019-07-19 08:47:53 PDT
Ideally these would be WPT tests, is it something we could do?

Otherwise, I guess we could use http/tests/websockets/imported/blink.
Comment 4 Carlos Garcia Campos 2019-07-19 08:53:55 PDT
(In reply to youenn fablet from comment #3)
> Ideally these would be WPT tests, is it something we could do?

I don't see permessage-deflate tests in wpt

> Otherwise, I guess we could use http/tests/websockets/imported/blink.

Good point, that will work.
Comment 5 Carlos Garcia Campos 2019-08-01 05:11:53 PDT
Created attachment 375306 [details]
Patch

Alex or Youenn, I need a review here, please, I'm currently preparing a new release including the new WebSockets code path that I have to make tomorrow.
Comment 6 Alex Christensen 2019-08-01 07:07:52 PDT
Comment on attachment 375306 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=375306&action=review

great

> Source/WebKit/WebProcess/Network/WebSocketChannel.cpp:79
> +    return m_extensions.isNull() ? emptyString(): m_extensions;

space before colon
Comment 7 Alex Christensen 2019-08-01 07:14:04 PDT
Comment on attachment 375306 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=375306&action=review

> Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm:87
> +    m_channel.didConnect(protocol, { });

Actually, could you move the "FIXME: support extensions." comment to here?
Comment 8 Carlos Garcia Campos 2019-08-01 07:21:33 PDT
Committed r248102: <https://trac.webkit.org/changeset/248102>
Comment 9 Carlos Garcia Campos 2019-08-01 07:22:02 PDT
Thanks for the review, fixed both things.