Project

General

Profile

Bug #38482

Updated by Evgeni Golov 10 days ago

When uploading chunks using `PUT /katello/api/repositories/:repository_id/content_uploads/:id`, one can send the data as application/x-www-form-urlencoded and as multipart/form-data. 
 As urlencoded data is bigger, multipart is preferred. 

 Hammer seems to set "multipart: true" to RestClient in https://github.com/Katello/hammer-cli-katello/blob/1cb23adb604e2f8be56384a380666c22f5725bc6/lib/hammer_cli_katello/repository.rb#L535-L554 
 But while looking at the data submitted, it looks like it's actually encoded as multipart, it's not flagged as a "file". plain text. 

 When using multipart uploads in Python (using requests), the controller receives a ActionDispatch::Http::UploadedFile (as requests always does "file" uploads), it should), but never reads it, resulting in bad data being processed.

Back