Pathological: ǝsodɹnd uo sǝʌɐɥǝqsıɯ ʇɐɥʇ ɹǝʌɹǝs qǝʍ ∀

An upside-down teapot with the upside-down text HTTP/1.1 418 I'm a teapot

Web servers are unpredictable assholes, so I finally decided to build one that is predictably an asshole all the time.

You already know that web servers are assholes if you've ever done any web crawling or scraping: they lie about timestamps, have missing or outdated sitemaps, return empty responses, and so much more.

So I built a misbehaving web server that predictably exhibits all of the pathologies I've seen over the years. Honestly I should have done this decades ago. It's live at https://pathological.answersfrom.me, or you can build and host it yourself (https://github.com/andy-tmpt-me/afm-pathological).

If you do anything with web crawling or scraping, feel free to give it a try. I hope it fails miserably for you!

What it is

This is a web server with predictable bad behavior, for tests of crawlers, scrapers and HTTP clients. Each host name below selects a behavior of the whole host: how it answers robots.txt, sitemaps, feeds, HEAD requests, conditional requests and user agents. On every host the same page families serve one case per path: redirects, wrong content types, pages that change each day, link traps, slow and torn responses and more.

Each page is an article about sourdough baking, so that all pages read as the work of one author. The server keeps no state: each answer depends only on the request and its time. The root page of each host is its README, which lists every URL of that host with its behavior.

Hosts

HostCharacterWhat the host root says
breadcrumbsYou find its pages only by following linksrobots.txt with no Sitemap line. No feed, no /sitemap.xml, no /wp-json
librarianKeeps an accurate catalogrobots.txt lists /sitemap.xml. Each lastmod is the true date of the last change. ETag and Last-Modified are true; a conditional GET answers 304
town-crierAnnounces everything in a feedAn RSS feed at /feed. robots.txt with no Sitemap line
miragePromises a map that is not thererobots.txt lists /sitemap.xml, which answers 404
chicken-littleSays that everything changed, each timeAs librarian, but each lastmod, and the ETag and Last-Modified of each response, are the time of the request. The text of the 18 pages of its sitemap never changes
rip-van-winkleSays that nothing changesAs librarian, but each lastmod is 2026-01-01, also for new pages. The ETag and Last-Modified of each response never change and each conditional GET answers 304. Its sitemap lists 20 URLs: the 18, and /chameleons/honest-edit and /chameleons/silent-edit, whose text changes each day
hoarderHas more pages than a crawler probably wantsrobots.txt lists /sitemap_index.xml: five nested sitemaps of 100 constant articles each (/hoard/1 to /hoard/500). The fifth also lists the seven daily pages, at its end: 507 URLs. The index has no dates
squirrelHas a map and tells no one/sitemap.xml exists with no lastmod. /robots.txt answers 404
headless-horsemanCannot answer a HEAD requestEach HEAD answers 405. GET is normal. An RSS feed at /feed. robots.txt with no Sitemap line
tipsy-cartographerDraws maps that are wrongrobots.txt lists five sitemaps: /maps/good.xml (the 18 URLs, with a PHP warning before <?xml), /maps/missing.xml (404), /maps/feed.xml (an RSS feed), /maps/elsewhere.xml (only URLs of librarian and example.com) and /maps/malformed.xml (XML that does not parse)
gutenbergIs a WordPress site/wp-json/wp/v2/posts answers with JSON. The root page has <meta name="generator" content="WordPress 6.6">. An RSS feed at /feed
yes-manAnswers 200 to everythingEach path returns the README as text/html, also /robots.txt, /feed, /index.xml, /sitemap.xml and /wp-json/wp/v2/posts, for GET and HEAD
slothTakes its timerobots.txt, with no Sitemap line, answers after 15 s. Each HEAD answers after 12 s. Each other response answers after 2 s. A longer delay of a case stays: /potholes/slow-get answers a GET after 35 s
whispererNames its feed only in the head of its root pageNo feed at the six root paths, no sitemap, robots.txt with no Sitemap line. The README has <link rel="alternate" type="application/rss+xml" href="/dispatches">. /dispatches is an RSS feed
masqueradeServes its root page as XML/index.xml returns the README HTML as application/xml. /feed returns it as text/html
janusOne site with two namesTwo hostnames, same content. robots.txt lists /sitemap.xml. Each of its 18 URLs has the apex name. After the apex entry of /articles/starter it lists that page two more times: with the www. name, and with the host in upper case
forwarding-addressMoved awayEach path except /README.md and /clock, also /robots.txt, answers 301 to the same path on librarian
doormanLets in only guests that it does not knowEach request with a Chrome 120 User-Agent (Chrome/120.0.0.0) answers 403, also /robots.txt and each HEAD. Each other request is normal. robots.txt has no Sitemap line

The host janus also answers at its second name, www.janus.pathological.answersfrom.me.

How a host is selected

The host is the first label of the Host header, after an optional www.. The request header X-Pathological-Host: <host name> replaces the Host header, so curl -H 'X-Pathological-Host: breadcrumbs' https://pathological.answersfrom.me/ reaches breadcrumbs through this address; a value that is not a host name answers 404 with the list of host names on every path. With no such header, a Host that names no host answers this page at / (as Markdown at /README.md), /clock, /preview.jpg (the image of a link preview), a robots.txt that allows only this page and that image, and 404 on every other path.

How time works

Content that changes each day uses the day number: the number of days from 2026-01-01 to the UTC date of the request. The request header X-Pathological-Date: YYYY-MM-DD replaces the date for one request, and /clock returns the UTC time, the date and the day number as JSON. Behavior that needs state uses two 30-second slots: a request in seconds 0 to 29 of the minute is in the error slot, one in seconds 30 to 59 in the ok slot.

Related Projects

These open-source projects and public sites also give a crawler, a scraper or an HTTP client something difficult to work with.

ProjectWhat it is
crawler-test.comA site of test pages for SEO crawlers: titles, description tags, encodings, robots rules, redirects, links, canonical tags and status codes.
Security Crawl MazeA test bed for security crawlers. Its pages link to a resource in every way that a web page can, and one endpoint returns the URLs that a crawler must find.
HttpCrawlerTestSiteA small PHP site that tests the essential functions of a crawler.
HammsA badly behaved HTTP server for tests of HTTP clients. Each port has one failure: no answer, a slow answer, a malformed answer or a closed connection.
pathodA pathological HTTP daemon. A small language in the URL builds almost any response, a malformed one included.
huhhttpAn evil web server that fuzz tests crawlers and download tools with malformed and hostile responses.
errorworks (ChaosWeb)Fake servers that inject faults at configured rates. ChaosWeb is the web server for tests of scrapers.
go-httpbinA general HTTP request and response service: status codes, delays, redirects, headers and bodies on request.
ToxiproxyA TCP proxy that adds latency, timeouts and outages between a client and a real server.
toscrape.comPractice sites for web scraping (a book store and a quotes site) that exercise data extraction.
NepenthesA tarpit that gives unwanted crawlers an endless maze of slow, generated pages.
iocaineA tarpit that gives unwanted crawlers an endless maze of generated text.

Source

The source code is at https://github.com/andy-tmpt-me/afm-pathological, under the MIT licence.