Skip to content

add support for default-document #31

Description

@benadler

When using the FilesystemHandler, I get directory listings even when a directory contains an index.html. So I patched filesystemhandler.cpp like this:

void FilesystemHandlerPrivate::processDirectory(Socket *socket, const QString &path, const QString &absolutePath) {

    // if there's an index.html, use it instead!
    const QFileInfo index(absolutePath + "/index.html");
    if (index.exists()) {
        processFile(socket, index.absoluteFilePath());
        return;
    }

    // Add entries for each of the files
    QString listing;
    ....

Is that useful? Or does the API already support this, and I missed that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions