Fix an issue with range support, prepare for release (#62)

Removed content-length header when sending a 4xx response
Added corresponding test

Also cleaned up the implementation by DRYing up access to regex matches
4 files changed
tree: 7302a3c41de0734d5f8b94efacec7e09b2ba878b
  1. .github/
  2. example/
  3. lib/
  4. test/
  5. .gitignore
  6. analysis_options.yaml
  7. CHANGELOG.md
  8. CONTRIBUTING.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

shelf_static is a Handler for the Dart shelf package.

Build Status

Example

import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_static/shelf_static.dart';

void main() {
  var handler = createStaticHandler('example/files', 
      defaultDocument: 'index.html');

  io.serve(handler, 'localhost', 8080);
}