Univention Bugzilla – Attachment 10173 Details for
Bug 50117
[UDM HTTP API] HTTP 400 when Content-Type in header of GET request
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch makes API ignore unnecessary 'Content-Type' header.
ignore_content-type.patch (text/plain), 913 bytes, created by
Daniel Tröder
on 2019-09-06 04:04:59 CEST
(
hide
)
Description:
Patch makes API ignore unnecessary 'Content-Type' header.
Filename:
MIME Type:
Creator:
Daniel Tröder
Created:
2019-09-06 04:04:59 CEST
Size:
913 bytes
patch
obsolete
>diff --git a/management/univention-management-console-module-udm/src/univention/management/modules/udm/module.py b/management/univention-management-console-module-udm/src/univention/management/modules/udm/module.py >index 30a2b0f102..abe566d61e 100755 >--- a/management/univention-management-console-module-udm/src/univention/management/modules/udm/module.py >+++ b/management/univention-management-console-module-udm/src/univention/management/modules/udm/module.py >@@ -457,7 +457,7 @@ class RessourceBase(object): > def decode_request_arguments(self): > content_type = self.request.headers.get('Content-Type', '') > if self.request.method in ('HEAD', 'GET', 'OPTIONS') and content_type: >- raise HTTPError(400, 'safe HTTP method should not contain request body/content-type') >+ return > if content_type.startswith('application/json'): > try: > self.request.body_arguments = json.loads(self.request.body)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 50117
: 10173