508 Loop Detected

The server terminated the operation because it encountered an infinite loop while processing it.

Status

HTTP/1.1 508 Loop Detected

Details

508 comes from the WebDAV bindings extension. Bindings let a resource appear at several paths, which makes it possible to build a cycle: a collection that eventually contains itself. A deep operation across such a graph would never terminate, so the server stops and reports 508.

It is also used more loosely for other detected infinite loops, such as a recursive include or a redirect cycle caught by the application rather than by the client.

Common causes

How to fix it

As the client

As the server

Examples

PROPFIND /dav/collections/ HTTP/1.1
Host: files.example.com
Depth: infinity

HTTP/1.1 508 Loop Detected

Specifications

RFC 5842 §7.2

See also