title: SWI-Prolog http_post and http_delete inexplicably hang
body: <p>When I attempt to use SWI-Prolog's <code>http_post/4</code>, as follows:</p>
  
  <pre><code>:- use_module(library(http/http_client).
  
  update(URL, Arg) :-
      http_post(URL, form([update = Arg), _, [status_code(204)]).
  </code></pre>
  
  <p>When I query this rule, and watch the TCP traffic, I see the HTTP POST request and reply with the expected 204 status code both occur immediately. However, Prolog hangs for up to 30 seconds before returning back 'true'. What is happening that prevents the rule from immediately returning?</p>
  
  <p>I've tried this variant as well, but it also hangs:</p>
  
  <pre><code>:- use_module(library(http/http_client).
  
  update(URL, Arg) :-
      http_post(URL, form([update = Arg), Reply, [status_code(204)]),
      close(Reply).
  </code></pre>
  
  <p>I have a similar issue with <code>http_delete/3</code>, but <em>not</em> with <code>http_get/3</code>.</p>