508
HTTPSERVER_ERRORCritical5xx Server ErrorHIGH confidence

Loop Detected

Production Risk

Moderate. It indicates a problem with the resource structure on the server, but it also shows the server is correctly protecting itself from resource exhaustion.

What this means

The server detected an infinite loop while processing the request (sent in lieu of 208 Already Reported). This indicates that the server terminated an operation because it encountered an infinite loop while processing a request with 'Depth: infinity'.

Why it happens
  1. 1A WebDAV request with 'Depth: infinity' encounters a circular reference in the directory structure (e.g., a symbolic link that points to a parent directory).
  2. 2This prevents the server from endlessly traversing the directory tree and exhausting resources.
How to reproduce

A PROPFIND request with infinite depth is made on a directory structure where a subdirectory contains a symbolic link to its own parent directory.

trigger — this will error
trigger — this will error
PROPFIND /docs/ HTTP/1.1
Host: webdav.example.com
Depth: infinity

expected output

HTTP/1.1 508 Loop Detected

Fix 1

Fix the Directory Loop

WHEN You control the server filesystem.

Fix the Directory Loop
Remove the symbolic link or other binding that is causing the infinite loop.

Why this works

Server Administration

Fix 2

Avoid Infinite Depth

WHEN You are the client.

Avoid Infinite Depth
Use a finite 'Depth' header (e.g., 'Depth: 1') instead of 'infinity' if possible.

Why this works

Client-Side Correction

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All HTTP errors