CrowdHailer / Ace

HTTP web server and client, supports http1 and http2

Home Page:https://hex.pm/packages/ace

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update `Ace.HTTP` to Raxx 0.12.0

CrowdHailer opened this issue · comments

This version of Raxx replaces handle_request/2 with the combination of handle_headers/2, handle_fragment/2 and handle_trailers/2

Most changes will need to be made within Ace.HTTP.Handler,

  • Handler.process_buffer should be split in to two functions. one to process the request head and one for the content.
  • Handler.handle_packet needs to call mod.handle_headers with a request with body set to true or false before reading the request body
  • Use content-length to decide if request has body, content-length of 0 is still no body.
  • host header is set as authority key in Raxx.Request

NOTE: I think we should also give up on using Raxx.Verify. it was a nice idea to have a common set of tests that can be used across adapters, but I think at this point it is an extra level of indirection and complexity at the moment

@samphilipd If you have the time to pick this up great.

Follow up: can be subsequent PR's

  • Support correct behaviour for keep-alive for both HTTP/1.0 and HTTP/1.1
  • Start worker process for each request if supporting pipelining
  • Remove headers that are for connection only from request struct passed to application]
  • Remove reference to connection and transfer-encoding from raxx
  • Add support for transfer-encoding in place of content-length, return error if both present.

Check against this Tokumei issue

See version 0.5.0 on hex.pm