Revision 381a548c snf-pithos-app/pithos/api/functions.py

b/snf-pithos-app/pithos/api/functions.py
98 98
                return authenticate(request)
99 99
        return account_list(request)
100 100
    else:
101
        return api.api_method_not_allowed(request)
101
        return api.api_method_not_allowed(request, allowed_methods=['GET'])
102 102

  
103 103

  
104 104
@csrf_exempt
......
117 117
    elif request.method == 'GET':
118 118
        return container_list(request, v_account)
119 119
    else:
120
        return api.api_method_not_allowed(request)
120
        return api.api_method_not_allowed(request,
121
                                          allowed_methods=['HEAD',
122
                                                           'POST',
123
                                                           'GET'])
121 124

  
122 125

  
123 126
@csrf_exempt
......
140 143
    elif request.method == 'GET':
141 144
        return object_list(request, v_account, v_container)
142 145
    else:
143
        return api.api_method_not_allowed(request)
146
        return api.api_method_not_allowed(request,
147
                                          allowed_methods=['HEAD',
148
                                                           'PUT',
149
                                                           'POST',
150
                                                           'DELETE',
151
                                                           'GET'])
144 152

  
145 153

  
146 154
@csrf_exempt
......
172 180
    elif request.method == 'DELETE':
173 181
        return object_delete(request, v_account, v_container, v_object)
174 182
    else:
175
        return api.api_method_not_allowed(request)
183
        return api.api_method_not_allowed(request, allowed_methods=['HEAD',
184
                                                                    'GET',
185
                                                                    'PUT',
186
                                                                    'COPY',
187
                                                                    'MOVE',
188
                                                                    'POST',
189
                                                                    'DELETE'])
176 190

  
177 191

  
178 192
@api_method('GET', token_required=False, user_required=False, logger=logger)

Also available in: Unified diff