Skip to content

request: provide read-headers and parse-bindings - #81

Merged
jeapostrophe merged 2 commits into
racket:masterfrom
Bogdanp:reprovide-requests
Nov 12, 2019
Merged

jeapostrophe merged 2 commits into
racket:masterfrom
Bogdanp:reprovide-requests

Conversation

@Bogdanp

@Bogdanp Bogdanp commented Nov 12, 2019

Copy link
Copy Markdown
Contributor

It looks like some packages (eg. rfc6455) were depending on these despite them not being documented.

Closes #80.

It looks like some packages (eg. rfc6455) were depending on these
despite them not being documented.
real? didn't really fit since a header is made up of an whole number
of characters.
(values request? boolean?)))

(provide/contract
[parse-bindings (-> bytes? (listof binding?))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth adding a comment here so that others don't make the same reasonable assumption you did in the future.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe even document these bindings.

;;

(define nonnegative-length/c
(or/c exact-nonnegative-integer? +inf.0))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshedding about names: if we use this for more things as we were discussing in #77, it would apply to timeouts and counts (e.g. #:max-request-files) as well as "length"s per se. I don't have a great idea for a name, but maybe something like nonnegative-limit/c?

@jeapostrophe

Copy link
Copy Markdown
Contributor

I'm going to merge this quickly to get the package install workable and then we can do a documentation or argue about the names later.

@Bogdanp
Bogdanp deleted the reprovide-requests branch November 22, 2019 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

web-server/http/request lost read-headers

4 participants