← OSS Labs
axios/axios · OSS Lab

Axios keeps a stale content-type for React Native FormData

Visible upstream regression test fails on the parent snapshot

Open Labarrow_forwardPlayable · ready
EasyAPI & Request FlowPlayable
OSS Labs are training exercises derived from public open-source bug-fix history. Completing a lab is not an upstream contribution or merged PR. Buglyst is not affiliated with these projects.
7b3369aSource commit
b0771a3Parent commit
MITLicense
463Files
67,806Visible LOC
~20mEst. time

What this lab trains

checkRepository navigation
checkFailing test reproduction
checkRoot cause tracing
checkMinimal patch reasoning
checkPR-style explanation
checkHTTP request/response flow

Failing signal

What you’ll see when you run the visible regression test.

SymptomVisible upstream regression test fails on the parent snapshotEntry point hintStart at tests/unit/core/dispatchRequest.test.js.

Repo navigation focus

A public-safe starting path for the large repo snapshot.

Start here
  • tests/unit/core/dispatchRequest.test.js
Likely area
  • lib/helpers/resolveConfig.js
  • lib/helpers/toFormData.js
  • lib/adapters/http.js
  • tests/unit/core/dispatchRequest.test.js
Investigation path
  1. Run the visible regression: npm test -- tests/unit/core/dispatchRequest.test.js.
  2. Read the failing assertion about the content-type header on a React Native FormData request.
  3. Trace how axios resolves request config and decides the content-type for FormData request bodies.
  4. Determine why a previously-set content-type is not cleared when the React Native FormData path applies.
  5. Patch only the config-resolution path so the content-type is handled correctly, without changing unrelated request behavior.
Repo scale
  • 463 files
  • ~28k LOC (JS)
  • Real axios repo snapshot

PR-style report (preview)

The structured report you produce on accept. This is the format, not a real completion.

differencePR-STYLE REPORT
Sample format
Axios keeps a stale content-type for React Native FormDataaxios/axios

Problem

A regression reproduced from public bug-fix history causes a visible test to fail on the parent snapshot.

Root cause

Written by you, in your own words, after tracing the failing test into the runtime source. (Filled in from your submission — not provided here.)

Fix summary

A minimal patch that makes the visible regression test pass without breaking neighbouring behaviour.

Files changed

  • descriptiontest/<regression>.test.js
  • descriptionlib/<runtime-source>.js

Files inspected

  • descriptiontest/<regression>.test.js
  • descriptionlib/<runtime-source>.js

Tests run

  • terminalVisible regression test
  • terminalHidden edge-case validation

Validation result

Visible checks: pendingHidden validation: pending

Resume-safe summary

Completed an OSS-backed Buglyst debugging lab based on public bug-fix history: reproduced a failing test, traced the root cause, and shipped a minimal patch that passed visible and hidden validation. Not an upstream contribution.

OSS Labs are training exercises derived from public open-source bug-fix history. Completing a lab is not an upstream contribution or merged PR. Buglyst is not affiliated with these projects.