dart-lang / dart-lang/http

Possible issue with headers and authentication

Open
#1,584 3 comments 0 reactions 0 assignees View on GitHub
package:web_socket_channel
Dominant language
Dart
Stars
1.1k
Forks
419
Avg merge
4d 14h
Merged PRs (30d)
8

Description

Hello!

I'm not sure is an issue of this library but it could be so here it is what I'm stuck in:

I'm using https://pub.dartlang.org/packages/stomp as a communication protocol but using web_socket_channel as websocket library because theirs have problems in Flutter.

With no authentication everything seems to work fine. The problem appears when I try to set a User header (bear with me here I'm not an expert on websockets) it seems that the websocket client library does not keep sending that header.

Since I might be confusing things, here is an example of the problem. As you can see this is the answer sent from the server to the client in flutter after the connect where I've authenticated the user and set it in the headers.

screenshot 2018-12-18 at 17 51 46

Here you can see the next action (subscribe) sent from the client (flutter) to the server where the client header does not appear again.

screenshot 2018-12-18 at 17 52 00

In order to discard the possibility of a bad configuration on the server side I've tested this with a javascript client and it worked well.

Any suggestions of what could be happening here?

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.