Skip to content

decoder: treat a non-numeric []byte form value as raw bytes - #255

Open
team-humaki wants to merge 1 commit into
gorilla:mainfrom
team-humaki:decoder-byte-slice
Open

team-humaki wants to merge 1 commit into
gorilla:mainfrom
team-humaki:decoder-byte-slice

Conversation

@team-humaki

Copy link
Copy Markdown

[]byte / []uint8 was decoded as a slice of numbers, so a form field like Test1 []byte with value anyvalue failed with error converting value for index 0.

A single non-numeric value is now the raw bytes. Numeric multi-value []uint8 (e=2&e=3) is unchanged.

Fixes #191

[]byte / []uint8 was decoded as a slice of numbers, so a field like
Test1 []byte with value "anyvalue" failed conversion. Keep numeric
multi-value []uint8 (e=2&e=3) working; a single non-numeric value
becomes the raw bytes.

Fixes gorilla#191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[question] Error converting into []byte or []uint8

1 participant