cfug / cfug/dio

Cannot handle redirects very well

Open
#2,486 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

h: need triage i: no useful information s: bug
Dominant language
Dart
Stars
12.8k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Package

dio

Version

lastest

Operating-System

Android

Adapter

Default Dio

Output of flutter doctor -v

Dart Version

No response

Steps to Reproduce

Set followRedirect to false(why?dio redirect will use default useragent)
Disable 304 exception
Request a url to redirect

Expected Result

Return response even if content length is zero

Actual Result

DioException [unknown]: null
I/flutter ( 5857): Error: HttpException: Connection closed before full header was received

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the redirect request on Android with Dio's default adapter, using followRedirect=false and a zero-content-length response. Start by tracing the adapter's redirect and response-header handling; done means the response is returned without a DioException when the content length is zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.