This is either a spec issue or a documentation issue.

## Steps to reproduce
1. Set the config value `couch_httpd_auth.allow_persistent_cookies` to `true`
2. `POST` username and password to `/_session` as described in 
[docs](http://docs.couchdb.org/en/stable/api/server/authn.html?highlight=set-cookie#post--_session)

## Results

The response contains a header of this form:

```
Set-Cookie: AuthSession=cm9vdDo1MEJCRkYwMjq0LO0ylOIwShrgt8y-UkhI-c6BGw; 
Version=1; Expires=Thu, 20-Sep-2018 11:24:18 GMT; Max-Age=86400; Path=/; 
HttpOnly; Secure
```

## Issue

We are concerned with the `Expires` value:
```
Expires=Thu, 20-Sep-2018 11:24:18 GMT
```

Does this date format implement any known RFC?


[RFC6265](https://tools.ietf.org/html/rfc6265#section-4.1.1) defines the 
`Set-Cookie` field, and specifies that the `Expires` date is defined in 
[RFC2616, Section 3.3.1](https://tools.ietf.org/html/rfc2616#section-3.3.1). 
This section cites three date formats:

```
      Sun, 06 Nov 1994 08:49:37 GMT  ; RFC 822, updated by RFC 1123
      Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
      Sun Nov  6 08:49:37 1994       ; ANSI C's asctime() format
```

The CouchDB `Expires` format satisfies none of these.

 Is the CouchDB `Expires` date format specified somewhere, either in CouchDB 
documentation or some other RFC?

## Context

I am writing a proxy server which needs to parse the `Expires` value. I 
couldn't find the place in the CouchDB codebase where it is set.

If there is an Erlang/Elixir library that parses this format, that would also 
be welcome.

[ Full content available at: https://github.com/apache/couchdb/issues/1610 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to