Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'multipart/form-data' #123

Merged
merged 1 commit into from May 3, 2024
Merged

Conversation

glimchb
Copy link
Contributor

@glimchb glimchb commented Apr 9, 2024

  • parse content type
  • extract boundary
  • extract 3 redfish spec parts (UpdateParameters, UpdateFile, OemXXX)
  • save data to temp file
  • return success

Signed-off-by: Boris Glimcher Boris.Glimcher@emc.com

- parse content type
- extract boundary
- extract 3 redfish spec parts (UpdateParameters, UpdateFile, OemXXX)
- save data to temp file
- return success

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
@glimchb
Copy link
Contributor Author

glimchb commented Apr 9, 2024

log example:

redfish-mockup-server-bmc-1  |    POST: Headers: Host: 127.0.0.1:8000
redfish-mockup-server-bmc-1  | User-Agent: python-requests/2.27.1
redfish-mockup-server-bmc-1  | Accept-Encoding: gzip, deflate
redfish-mockup-server-bmc-1  | Accept: */*
redfish-mockup-server-bmc-1  | Connection: keep-alive
redfish-mockup-server-bmc-1  | Content-Type: multipart/form-data; boundary=743667863fab4c9893ba103acb6e2b66
redfish-mockup-server-bmc-1  | X-Auth-Token: 1234567890ABCDEF
redfish-mockup-server-bmc-1  | OData-Version: 4.0
redfish-mockup-server-bmc-1  | Content-Length: 67106315
redfish-mockup-server-bmc-1  |
redfish-mockup-server-bmc-1  |
redfish-mockup-server-bmc-1  |    POST: Content-Type: multipart/form-data and {'boundary': '743667863fab4c9893ba103acb6e2b66'}
redfish-mockup-server-bmc-1  |    POST: MULTIPART: name=UpdateParameters and file=None
redfish-mockup-server-bmc-1  |    POST: MULTIPART: name=UpdateFile and file=my-fw-file-name-ver-123.bin
redfish-mockup-server-bmc-1  |    POST: Data: {}
redfish-mockup-server-bmc-1  | TBD: handle multipart
redfish-mockup-server-bmc-1  | 172.25.0.1 - - [09/Apr/2024 19:47:19] "POST /redfish/v1/UpdateService/update-multipart HTTP/1.1" 204 -

@MoshiBin @mraineri fyi

@glimchb glimchb marked this pull request as ready for review April 15, 2024 21:57
@mraineri
Copy link
Contributor

mraineri commented May 3, 2024

Approved 5/3

@mraineri mraineri merged commit 2693f06 into DMTF:main May 3, 2024
3 checks passed
@glimchb glimchb deleted the multipart branch May 6, 2024 13:41
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.

None yet

2 participants