DMTF / Redfish-Mockup-Server

A simple Python 3.4 program that can be copied into a folder at the top of any Redfish mockup and can serve Redfish requests on the specified IP/port.
Other
72 stars 37 forks source link

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

Closed glimchb closed 2 months ago

glimchb commented 2 months ago

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

glimchb commented 2 months ago

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

mraineri commented 2 months ago

Approved 5/3