Bug ID | 997935 |
---|---|
Summary | api returns HTTP 500 if a PUT request does not contain a Content-type: header |
Classification | openSUSE |
Product | openSUSE.org |
Version | unspecified |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Critical |
Priority | P5 - None |
Component | BuildService |
Assignee | bnc-team-screening@forge.provo.novell.com |
Reporter | mmarek@suse.com |
QA Contact | adrian@suse.com |
CC | afaerber@suse.com, jslaby@suse.com |
Found By | --- |
Blocker | --- |
The external Kernel:* and internal Devel:Kernel:* projects stopped updating recently, because the upload script is receiving HTTP 500 now. It can also be reproduced by curl: $ curl -n -T data.xml 'https://api.suse.de/source/home:michal-m:test/_meta?force=1' 500 Internal Server Error If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong. It does work with 'osc api -M PUT -f data.xml'. The difference turns out to be the Content-type header, which osc sends. I will fix the script to also send the header, but please fix the server so that it is not as picky. Ironically, the header value is not used anywhere: osc sends application/octet-stream when uploading XML and the server accepts anything: $ curl -n -T data.xml -H 'Content-type: yada/dada' 'https://api.suse.de/source/home:michal-m:test/_meta?force=1' <status code="ok"> <summary>Ok</summary> </status>