Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bring cookie handling in-house. Fixes issue #324 #325

Merged
merged 2 commits into from
Jan 26, 2023
Merged

Conversation

glynnbird
Copy link
Contributor

@glynnbird glynnbird commented Jan 26, 2023

Overview

Fixes a bug in cookie parsing. See Issue #324.

Testing recommendations

As well as the automated testing, a long-running script to see if a session outlasts the first cookie:

const Nano = require('.')
const nano = Nano(process.env.COUCH_URL)

const sleep = async (ms) => {
  return new Promise((resolve, reject) => {
    setTimeout(resolve, ms)
  })
}
const main = async () => {
  await nano.auth(process.env.COUCH_USER, process.env.COUCH_PASSWORD)

  do {
    const r = await nano.db.list()
    console.log(new Date().toISOString(), r.length)
    await sleep(30000)
  } while (1)
}

main()

GitHub issue number

Fixes Issue #324.

Related Pull Requests

A provisional PR that replaces Axios already had code to bring cookie handling in-house, so this has been brought forward here. See #314

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

@glynnbird glynnbird merged commit dc67354 into main Jan 26, 2023
@glynnbird glynnbird deleted the cookieparsing branch January 26, 2023 15:26
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.

2 participants