Skip to content

[FEATURE-REQUEST] multiple args with the same key are not handled correctly #292

@stuart-byma

Description

@stuart-byma

Prerequisites

Description

A query arg string can have multiple arguments with the same key, e.g. hello.com/what?test=one&test=two. libhttpserver only ever returns the last arg via get_args(). This is inconsistent with MHD, which will iterate multiple args with the same key. get_args() simply overwrites the last one.

This is also inconsistent with other http library, such as Go http package, which will return a collection of strings for a given argument key.

Steps to Reproduce

Expected behavior: get_args() returns a map contains all the values associated to one key, even if there are multiple.

Actual behavior: get_args() overwrites and always returns the last value for given key.

Reproduces how often: 100%

Versions

Not affected by versions.

Metadata

Metadata

Assignees

Labels

feature-requestFeature requests or enhancements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions