dio icon indicating copy to clipboard operation
dio copied to clipboard

Date header not parsed correctly

Open hampsterx opened this issue 1 year ago • 2 comments

Package

dio

Version

5.5

Operating-System

Web

Adapter

Default Dio

Output of flutter doctor -v

No response

Dart Version

No response

Steps to Reproduce

Date field is in RFC 2616 format, it includes a comma in the value. eg

Date => "Tue, 09 Jul 2024 19:39:05 GMT"

dio_web_adapter appears to be using

  headers: xhr.responseHeaders.map((k, v) => MapEntry(k, v.split(','))),

Expected Result

The full value not split.

Actual Result

"date" header as "Tue"

hampsterx avatar Jul 09 '24 19:07 hampsterx

@AlexV525 Do your changes here fix this issue?https://github.com/cfug/dio/blob/679a14410817357e4b4cb8cee75a3f585d675803/plugins/web_adapter/lib/src/adapter.dart#L312-L333

Reprevise avatar Aug 13 '24 22:08 Reprevise

Is there a working version for the implementation?

AlexV525 avatar Oct 05 '24 18:10 AlexV525

Hi @hampsterx , could you identify if the current version of the dio_web_adapter still produce the issue?

AlexV525 avatar Jan 23 '25 13:01 AlexV525

Closing as outdated.

AlexV525 avatar Jan 28 '25 14:01 AlexV525