Repository navigation
Use RFC 6265 cookies from net-cookies - #21
Conversation
Modifies web-server/http/cookie-parse, web-server/http/cookie, and web-server/http/id-cookie to use net/cookies from the net-cookies package, rather than the deprecated net/cookie.
| Constructs a cookie with the appropriate fields. | ||
|
|
||
| This is a wrapper around @racket[make-cookie] from @racketmodname[net/cookies/server] | ||
| for backwords compatability. The @racket[comment] argument is ignored. |
| for backwords compatability. The @racket[comment] argument is ignored. | ||
| If @racket[expires] is given as a string, it should match | ||
| @link["https://tools.ietf.org/html/rfc7231#section-7.1.1.2"]{RFC 7231, Section 7.1.1.2}, | ||
| in which case it will be converted to a @racket[date?] value. |
There was a problem hiding this comment.
Does this mean it will fail if it does not? Does net/cookies enforce a contract?
There was a problem hiding this comment.
net/cookies/server specifies (or/c date? #f). The old implementation of make-cookie specifies (or/c false/c string?), which is inherited from cookie:add-expires in net/cookie. So, since net/cookies/server doesn't accept a string, the wrapper make-cookie will convert it if possible or throw an exception.
|
Thanks! Is it possible to add a few tests of the new arguments/features? |
|
Definitely — I haven't really looked at |
|
Working on the tests, I've found an inconsistency. Given this definition: Evaluating However, the old version of I'm not immediately sure what the source of the discrepancy is or which behavior is correct. ETA: I think this is a bug in ETA: It looks like |
|
This test raises a contract violation because Should the test be eliminated? Or is ETA: It looks like |
|
Likewise, strings of the form |
|
Ok, I have pushed some tests. |
|
The tests look good. Do you have anything else planned or should we commit now? |
|
I don't have anything else in mind, so I think it's ready to go. |
|
Thank you very much! |
|
Unfortunately, this change causes significant problems for our continuous integration, because
I prefer option 2, but I'm open to other suggestions. |
|
Splitting |
|
Both are needed (for the latter, just pointing the name net-cookies at the
appropriate subdirectory, and creating the new packages)
…On Mon, Mar 13, 2017, 10:51 PM LiberalArtist ***@***.***> wrote:
Splitting net-cookies seems reasonable to me, but I'm not 100% clear on
how to do it. Is it just a matter of submitting a pull request to
reorganize the git repository, or is there something the maintainer needs
to do to update the package catalog?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#21 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAO785dc2Y2K58QRp2GvOQ_NYSNBckZeks5rlgCbgaJpZM4MXJsz>
.
|
(Needed so that web-server can depend on this: racket/web-server#21 ) The package catalog will also need to be updated to reflect this change.
|
I've submitted a pull request to split |
|
Can you prepare the pull-request for web-server to change its dep? |
Modifies web-server/http/cookie-parse, web-server/http/cookie,
and web-server/http/id-cookie to use net/cookies from the net-cookies
package, rather than the deprecated net/cookie.
resolves #20