This is really my bug, but we should:

```c
char *html = str_copy(res->data);
if (NULL == html) return NULL;
// ...
```