No Pusher method/options to add Http headers for web-socket connection establishment

オープン
#273 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
networking

調査の方向性

Start in src/main/java/com/pusher/client/connection/websocket/WebSocketClientWrapper.java, where the superclass constructor call is made, and in PusherOptions, which has no way to set headers today. The issue proposes a constructor that accepts a header map and forwards it to the superclass, plus a PusherOptions setter that passes the map down the chain. Done means an origin header set through PusherOptions reaches the websocket handshake. The issue has no comments or linked pull request, so check with maintainers about the API shape before writing code.

索引モデルが issue の本文から書いたものです。

説明

feature-request
What is the issue?

I need to send "origin" header to the server while I establish connection to it. But I couldn’t find any method or pusher options to do so. And the httpAuthorizer only sends headers when a private subscription is performed. As I investigated the Webscoket implementation for this library, I see that there is a WebsocketClient Constructor which takes in httpHeaders as an optional parameter which can solve my issue.

Any improvements you suggest

An additional constructor can be added to WebSocketClientWrapper (which extends the WebsocketClient) which takes a map of httpHeaders as a parameter and then update the super call to send in the httpHeaders.
With this change, a new PusherOptions method can be added which can take httpHeaders as a parameter and supply it up the chain.


CC @pusher/mobile

主要言語
Java
スター
315
フォーク
140
平均マージ
10日 14時間
マージ済み PR(30日)
5

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pusher/pusher-websocket-java のほかの issue

pusher/pusher-websocket-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。