webpack / webpack/webpack-dev-middleware

Support for multipart range requests

Open
#1,229 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.5k
Forks
380
Avg merge
3h 16m
Merged PRs (30d)
14

Description

Feature Proposal

Currently, webpack-dev-middleware only supports single-range requests, and will return the entire requested resource if multiple ranges are specified (https://github.com/webpack/webpack-dev-middleware/blob/master/src/middleware.js#L215-L218). I didn't see any documentation around this, or previous discussion about why it wasn't supported, so figured it'd be worth requesting the feature.

Feature Use Case

A multipart range request would allow noclip.website to load specific meshes/game objects efficiently without shipping an otherwise incredibly large (sometimes >1GB) game data file.

Please paste the results of npx webpack-cli info here, and mention other relevant information
  System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i5-10600K CPU @ 4.10GHz 
    Memory: 6.98 GB / 15.89 GB
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE        
    npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.39)
    Internet Explorer: 11.0.19041.1566
  Packages:
    babel-loader: ^8.2.2 => 8.2.3 
    css-loader: ^5.2.4 => 5.2.7 
    eslint-config-webpack: ^1.2.5 => 1.2.5 
    file-loader: ^6.2.0 => 6.2.0 
    html-webpack-plugin: ^4.5.2 => 4.5.2 
    less-loader: ^7.3.0 => 7.3.0 
    style-loader: ^2.0.0 => 2.0.0 
    url-loader: ^4.1.1 => 4.1.1 
    webpack: ^5.69.1 => 5.70.0 
    webpack-cli: ^4.7.2 => 4.9.2 
    webpack-dev-middleware: ^5.3.1 => 5.3.1 
    webpack-merge: ^5.8.0 => 5.8.0 

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

Start in src/middleware.js around lines 215-218, where single-range handling is identified in the issue. Read the surrounding request and response logic, then determine how multipart range responses should be represented for multiple requested ranges. Done means multiple ranges no longer return the entire resource, with behavior covered by the relevant middleware tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.