Skip to content

Spliting dump request to add Query 🐛 🚩 #1909

Merged
ReneWerner87 merged 1 commit into
gofiber:masterfrom
ancogamer:master
Jun 12, 2022
Merged

Spliting dump request to add Query 🐛 🚩 #1909
ReneWerner87 merged 1 commit into
gofiber:masterfrom
ancogamer:master

Conversation

@ancogamer

Copy link
Copy Markdown
Contributor

Spliting []dump into dumps, and editing the dump[1] to = req.URL.String(), so we can tests itens that depends on querys from the request.

Spliting []dump into dumps, and editing the dump[1] to = req.URL.String(), so we can tests itens that depends on querys from the request.
@ReneWerner87

Copy link
Copy Markdown
Member

hi thanks for the work

is this not already possible, just trying to understand what your customization is supposed to do

can you explain this in more detail and if necessary send an example, which shows what was not possible before and is now possible

@ReneWerner87

Copy link
Copy Markdown
Member

think i now understand the point of this pull requests

nevertheless please describe briefly in the pull request with an example, what is possible now, what did not work before

so that we have this stored here for later

can you please also extend the test with such a case
in: https://github.com/gofiber/fiber/blob/master/app_test.go

Comment thread app.go
}

// adding back the query from URL, since dump cleans it
dumps := bytes.Split(dump, []byte(" "))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please improve this construct with regard to performance and allocations

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will take a better a look on this. The problem is: imagine you have a query /foo?bar=boo, when the dump is create the query part is removed, staying /foo.

@ReneWerner87 ReneWerner87 merged commit 4d65e88 into gofiber:master Jun 12, 2022
trim21 pushed a commit to trim21/fiber that referenced this pull request Aug 15, 2022
Spliting []dump into dumps, and editing the dump[1] to = req.URL.String(), so we can tests itens that depends on querys from the request.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants