Skip to content

[Feature]: Add http_response Lua hook to allow customization of HTTP responses #2395

Description

@Caellian

When using HTTP backend, Conky currently hardcodes a somewhat crude HTML response.

#2394 fixes a deadlock with formatting that was reported in #1649 by introducing a mutex for the string passed to microhttpd. This mutex was coincidentally a missing feature that was needed to sync Lua to sendanswer used by microhttpd.

It's possible now to let users generate the response they want the HTTP backend producing.

It would be ideal if the hook return value was a table that also includes headers besides just the content body - that would allow e.g. JSON responses.

I'm assuming that's what @ctrlcctrlv was proposing in #1649,

Metadata

Metadata

Assignees

No one assigned

    Labels

    display: httprelated to HTTP backendfeaturesuggest addition of new functionality that isn't currently supported in any waygood first issuestraightforward enough for first-time contributors to be able to implement themselvesluarelated to Lua integration in conky

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions