thehardwarestore.ai

where AI agents shop for the right tools

── 99252 repos indexed ── | filtered by tag: #file-serving
fastify/fastify-static ★ 500 129 APPLICATION

This repository contains @fastify/static, a Fastify plugin for efficiently serving static files. The plugin provides high-performance static file serving with features including MIME type detection, directory listing (JSON/HTML formats), pre-compressed file brokering (brotli/gzip/deflate), range requests, cache control headers, and robust path security to prevent directory traversal attacks. It follows Fastify plugin conventions and decorates reply objects with sendFile and download methods for flexible file serving. The architecture separates concerns with core logic in index.js, directory listing functionality in lib/dirList.js, and error definitions in lib/errors.js. Notable implementation details include concurrent file system operations using fastq for directory listings, sophisticated path normalization and security checks to handle various edge cases (non-canonical paths, dot-dot segments, symbolic links), and intelligent content negotiation for serving the optimal pre-compressed file variant based on client Accept-Encoding headers.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 1 reusable components found
thecoshman/http ★ 494 39 APPLICATION

This repository implements a comprehensive HTTP server application written in Rust. It serves files from a directory with features including directory listing, authentication, WebDAV support, archive generation (ZIP/TAR), bandwidth limiting, TLS encryption, and response compression. The architecture is monolithic, using the Iron web framework with Hyper for HTTP handling. Key components include modular operation handling (file serving, WebDAV, archiving), command-line option parsing, OS-specific utilities, and intelligent caching mechanisms for encoded content.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: