Skip to content

library(http/http_server) broken since 0.10.0 (works up to 0.9.4) #3239

@danilp-id

Description

@danilp-id

There is some sort of dead lock in http_listen/2 from library(http/http_server).

Example code to reproduce the problem (taken from The Power of Prolog):

:- use_module(library(http/http_server)).

run(Port) :-
        http_listen(Port, [get(/, request_response)]).

request_response(_, Response) :-
        http_status_code(Response, 200),
        http_body(Response, text("Hello!")).

For the first request, there is some response printed to the console, but reply is not sent to the browser and the system is stuck at that point, unable to serve any further requests.

This code works in v0.9.4, but breaks in v0.10.0 (and the master, commit 453a88f at the time of writing).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions