luckyframework / authentic

An authentication library for Lucky projects
MIT License
14 stars 13 forks source link

Content-Type is empty #10

Closed snadon closed 5 years ago

snadon commented 6 years ago

Sometimes the Content-Type is empty (see: /sign_ins).

Here's a log from a .har file:

log.entries[0].pageref |   |   | object value found, but a string is required
-- | -- | -- | --
log.entries[0].startedDateTime |   |   | object value found, but a string is required
log.entries[0].serverIPAddress |   |   | object value found, but a string is required
log.entries[0].connection |   |   | object value found, but a string is required
log.entries[0].request.headersSize |   |   | is missing and it is not optional
log.entries[0].request.postData.mimeType |   |   | object value found, but a string is required
log.entries[0].response.headersSize |   |   | is missing and it is not optional
log.entries[0].response.content.encoding |   |   | object value found, but a string is required
log.entries[1].pageref |   |   | object value found, but a string is required
log.entries[1].startedDateTime |   |   | object value found, but a string is required
log.entries[1].serverIPAddress |   |   | object value found, but a string is required
log.entries[1].connection |   |   | object value found, but a string is required
log.entries[1].request.headersSize |   |   | is missing and it is not optional
log.entries[1].request.postData.mimeType |   |   | object value found, but a string is required
log.entries[1].response.headersSize |   |   | is missing and it is not optional
log.entries[1].response.content.encoding |   |   | object value found, but a string is required

Note: Environment was set as development.

jwoertink commented 5 years ago

This is fixed by https://github.com/luckyframework/lucky/pull/821

When visiting a path like /sign_ins from the browser, the browser doesn't send Content-Type, so we now fall back to checking Accept. This doesn't seem like an Authentic error anyway, so I'm closing this. If there is something specific to Authentic, we can reopen. Thanks!