adonisjs / adonisjs/http-server

`redirect()` doesn't take into account `forwardQueryString` argument

Open
#127 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
133
Forks
44
Avg merge
20d 9h
Merged PRs (30d)
2

Description

Package version

9.1.0

Describe the bug

When forwardQueryString is enabled globally, the redirect() method forwards the query parameters even when redirect is called with forwardQueryString set to false.

The reproduction repo contains the test that will fail in the above-mentioned scenario. This repo was created to match the specification of PERFECT ISSUE listed under Reporting Bugs.

Please let me know if a full reproduction is needed.

Reproduction repo

https://github.com/adonisjs/http-server/pull/126/changes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the failing test from the linked reproduction repository and trace the HTTP server's redirect() implementation. Verify the behavior when forwardQueryString is enabled globally but disabled for an individual redirect, then confirm the reproduction test passes without changing the intended default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.