SShortSingh.
Back to feed

Why a Accidental 404 Got Cached and When to Use 308 Instead of 301

0
·25 views

The author describes two HTTP status pitfalls encountered while building a reference page. A 404 response can be cached even when it carries no caching headers. Redirect codes also differ in how they treat request methods: 301 and 302 may change a POST into a GET, while 307 and 308 must preserve the method and body. For a renamed POST API endpoint, the author recommends 308 so clients keep sending request bodies. The post also notes that failed logins should return 401 with a WWW-Authenticate header, while 403 signals refused access to a known user. The author built a free browser reference of HTTP codes 100 to 511 with code snippets, and says the author's most-seen misuse is returning 200 with an error in the body.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

NukeViet Sites Easy to Find, but Upload Permissions Determine CVE-2026-94567 Risk

Public searches can identify NukeViet sites by title or page text, but they cannot show whether a site is actually exposed to CVE-2026-94567. The real risk depends on configuration, specifically whether SVG uploads are permitted and whether the stored files are served without script-blocking safeguards. Query counts from December 1, 2026 illustrate the gap: zero application fingerprints, 49 title matches, and 1,216 body matches, none of which reveal version or upload policy. Fixes are available in releases 4.6.02 and 4.5.12, and separate entry points such as comment attachments, banner uploads, and the admin file manager each need their own review. Recommended steps include confirming the CMS version, allowed extensions, upload roles, and response headers, with temporary containment such as removing SVG and restricting unauthenticated uploads where updating is not immediately possible.

0
ProgrammingDEV Community ·

Three design rules behind IRON LOG, a spreadsheet-based gym tracker built to resist user errors

A solo developer built IRON LOG, a gym planner and workout tracker contained in a single spreadsheet, where users enter sets and a dashboard displays streaks, volume and best lifts. To prevent breakage, all inputs sit in marked yellow cells while calculations are kept on a hidden sheet, so users never need to edit formulas. The five main lifts are set as dropdowns so the dashboard can reliably find best lifts by name, while custom exercises are allowed but excluded from those cards. The creator tested the file in LibreOffice and Google Sheets with no errors, but acknowledged it has not been verified across all Excel versions and invited bug reports. The product is sold as a $9 one-time purchase on Gumroad and is described as a logbook and planner rather than a coaching or medical tool.

0
ProgrammingDEV Community ·

AIVideoWatch Launches Free Zero-Auth MCP Server for Live AI Video Pricing

AIVideoWatch Research has released a free Model Context Protocol server that gives AI coding agents such as Claude Code and Cursor access to current AI video pricing. The server requires no API key, token, or signup and is listed in the Official MCP Registry and Glama.ai. It queries audited pricing across more than 1,283 plans on 53 platforms and 299 direct pay-per-second APIs. Four tools are offered: finding the cheapest verified model rate, modeling cost per clip with retry overhead, comparing models head-to-head, and ranking platforms by normalized per-minute floors. The company says the underlying benchmark data is also published openly under a CC BY 4.0 license.

0
ProgrammingDEV Community ·

Asymmetric KV-Cache Quantization in llama.cpp: Q8_0 Keys with Q4_0 Values on Apple Silicon

llama.cpp lets users set key and value cache quantization independently through --cache-type-k and --cache-type-v, rather than treating both the same. The article argues keys need higher precision because they drive attention routing via the softmax, while values, which are summed after softmax, tolerate tighter quantization. Using GGML block sizes, the author calculates that pairing Q8_0 keys with Q4_0 values yields a KV cache about 0.406 times the size of FP16, a reduction near 60%. The savings compound across concurrent sequences, which matters for multi-slot local serving on Apple Silicon machines with 24 to 48 GB of unified memory. The piece also presents a three-part unified memory breakdown covering weights, KV cache, and compute scratch.