Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.

Releases: ponylang/http_server

0.6.3

Choose a tag to compare

@ponylang-main ponylang-main released this 16 Jul 02:42

Change SSL dependency

We've switched our SSL dependency from ponylang/net_ssl to ponylang/ssl. ponylang/net_ssl is deprecated and will soon receive no further updates.

[0.6.3] - 2025-07-16

Changed

  • Change SSL Dependency (PR #84)

0.6.2

Choose a tag to compare

@ponylang-main ponylang-main released this 20 Apr 22:05

Update LibreSSL version used on Windows

We've updated the LibreSSL version used on Windows to 3.9.1.

[0.6.2] - 2024-04-20

Changed

  • Update LibreSSL version used on Windows (PR #79)

0.6.1

Choose a tag to compare

@ponylang-main ponylang-main released this 02 Apr 18:09

Rename upgrade to upgrade_protocol

To allow changing the TCP handler of a running HTTP connection, Session specifies a method upgrade_protocol, which should be implemented by the concrete classes. The implementation used by the actual HTTP server had an implementation for this feature, but the method was called upgrade. As Session provides a default implementation for upgrade_protocol, this wasn't caught. By renaming the implementation it's now possible to use the new feature to change the handler to a custom handler to handle for example WebSocket connections.

[0.6.1] - 2024-04-02

Fixed

  • Implement the correct method in the server_connection (PR #78)

0.6.0

Choose a tag to compare

@ponylang-main ponylang-main released this 12 Mar 18:19

Add Session.upgrade_protocol behaviour

This can be used to upgrade the underlying TCP connection to a new incompatible protocol, like websockets.

Calling this new behaviour allows this TCP connection to be upgraded to another handler, serving another protocol (e.g. WebSocket).

Note that this method does not send an HTTP Response with a status of 101. This needs to be done before calling this behaviour. Also, the passed in notify will not have its methods accepted or connected called, as the connection is already established.

After calling this behaviour, this session and the connected Handler instance will not be called again, so it is necessary to do any required clean up right after this call.

See:

[0.6.0] - 2024-03-12

Added

  • Add possibility to upgrade the current session to a new TCP handler (PR #75)

0.5.0

Choose a tag to compare

@ponylang-main ponylang-main released this 18 Feb 19:11

Ensure Content-Length is set for all Responses that need it

Previously responses without explicitly added Content-Length didn't add that header with a 0 value. This made some HTTP clients hang.
Now all responses built with this library will have a default Content-Length header set, unless marked with Transfer-Encoding: chunked

Added ResponseBuilderHeaders.set_content_length(content_length: USize)

This way it is more convenient to set a content-length from a numeric value. E.g. from the size of a prepared array to be passed as HTTP body:

let body = "I am a teapot"
let response = 
  Responses.builder()
    .set_status(StatusOK)
    .set_content_length(body.size())
    .add_header("Content-Type", "text/plain")
    .finish_headers()
    .add_chunk(body)
    .build()

Added BuildableResponse.delete_header(header_name: String)

Previously it was not possible to delete a header, once set it was permanent. No it is possible to delete a header e.g. in multi-stage processing of a HTTP response.

ResponseBuilderBody.add_chunk() now takes a ByteSeq instead of Array[U8] val

This allows to pass String val as well as Array[U8] val to add_chunk.

let response = Responses.builder()
  .set_content_length(7)
  .finish_headers()
  .add_chunk("AWESOME")
  .build()

BuildableResponse.create() now only takes a Status and optionally a Version

The logic applied to set content_length and transfer_encoding from the constructor parameters was a bit brittle, so it got removed. Use both set_content_length(content_length: USize) and set_transfer_encoding(chunked: (Chunked | None)) to set them:

let body = "AWESOME"
let response = BuildableResponse
  .create(StatusOK)
  .set_content_length(body.size())
  .set_header("Content-Type", "text/plain")

Response.transfer_coding() changed to .transfer_encoding()

The wording now is now equal to the actual header name set with this method.

BuildableResponse.set_transfer_coding() changed to .set_transfer_encoding()

Following the Response trait.

[0.5.0] - 2024-02-18

Fixed

  • Ensure Content-Length is set for all Responses that need it (PR #74)

Added

  • Added ResponseBuilderHeaders.set_content_length(content_length: USize) (PR #74)
  • Added BuildableResponse.delete_header(header_name: String) (PR #74)

Changed

  • ResponseBuilderBody.add_chunk() now takes a ByteSeq instead of Array[U8] val (PR #74)
  • BuildableResponse.create() now only takes a Status and a Version (PR #74)
  • BuildableResponse.set_transfer_coding() changed to .set_transfer_encoding() (PR #74)
    • Response.transfer_coding() changed to .transfer_encoding() (PR #74)

0.4.6

Choose a tag to compare

@ponylang-main ponylang-main released this 14 Jan 22:08

Update ponylang/net_ssl dependency

We've updated our ponylang/net_ssl dependency from version 1.3.1 to version 1.3.2.

[0.4.6] - 2024-01-14

Changed

  • Update to ponylang/net_ssl 1.3.2 (PR #69)

0.4.5

Choose a tag to compare

@ponylang-main ponylang-main released this 27 Apr 11:55

Update ponylang/net_ssl dependency

We've updated our ponylang/net_ssl dependency from version 1.3.0 to version 1.3.1.

[0.4.5] - 2023-04-27

Changed

  • Update ponylang/net_ssl dependency (PR #55)

0.4.4

Choose a tag to compare

@ponylang-main ponylang-main released this 14 Feb 18:55

Update to address JSON package removal from the standard library

We've updated our dependencies to address the json package being removed from the Pony standard library.

[0.4.4] - 2023-02-14

Changed

  • Update for json package removal from standard library (PR #52)

0.4.3

Choose a tag to compare

@ponylang-main ponylang-main released this 03 Jan 22:18

Add support for OpenSSL 3

We've added support for working with SSL libraries that use the OpenSSL 3 API by upgrading to ponylang/net_ssl version 1.3.0.

[0.4.3] - 2023-01-03

Added

  • Add OpenSSL 3 support (PR #51)

0.4.2

Choose a tag to compare

@ponylang-main ponylang-main released this 26 Aug 13:26

Updated default connection heartbeat length

Previously, the default connection heartbeat was incorrectly set to 1ms. We've updated it to the value it was intended to be: 1000ms.

Sending a heartbeat every millisecond was excessive, and this change should improve performance slightly.

[0.4.2] - 2022-08-26

Fixed

  • Update default connection heartbeat length (PR #47)