Skip to content

Conversation

@jasonyork
Copy link
Contributor

Description

I ran into this issue when attempting to implement the Parts Headers example

If the param has a string key, but the key in the headers is a symbol, the additional headers will not be supplied. In the example in the README the following key is a string:

"file_metadata_01" => { "description" => "A nice picture!" }

while the header has a symbol for a key:

'file_metadata_01': { ... }

This example does not work with the current code.

Types of Changes

  • Bug fix.

This PR forces the keys to a symbol when retrieving the headers, ensuring a match.

Testing

  • I added tests for my changes.
  • I tested my changes locally.

Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
@jasonyork
Copy link
Contributor Author

@patrickdavey - Do you have any feedback for me on this PR? Thanks.

@ioquatix ioquatix merged commit 6d9baff into socketry:main Jun 2, 2022
@ioquatix
Copy link
Member

ioquatix commented Jun 2, 2022

This looks okay to me.

olleolleolle added a commit to olleolleolle/multipart-post that referenced this pull request Jun 2, 2022
@olleolleolle olleolleolle mentioned this pull request Jun 2, 2022
ioquatix pushed a commit that referenced this pull request Jun 2, 2022
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