Project

General

Profile

Actions

Bug #3770

closed

API calls using JSON content instead of parameters are ignored

Added by Vincent MEMBRÉ over 10 years ago. Updated over 10 years ago.

Status:
Released
Priority:
1
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

When calling /api/directives/id with json parameters to update a directive only the one using parameters is working.

If you call this with a JSON data, this will be ignored by the API.

This is due to some pattern matching in Scala :

 case Post id :: Nil, req => ...

 case id :: Nil JsonPost, req => ...

The first case includes the second one, so the jsonPost is never matched.

Actions #1

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from New to Pending technical review
  • Pull Request set to https://github.com/Normation/rudder/pull/276
Actions #2

Updated by Vincent MEMBRÉ over 10 years ago

  • Subject changed from API with JSON parameters is not called, and use the parameters one to API using JSON parameters is ignored.
Actions #3

Updated by Vincent MEMBRÉ over 10 years ago

  • Assignee changed from Vincent MEMBRÉ to François ARMAND
Actions #4

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #5

Updated by Anonymous over 10 years ago

Actions #6

Updated by Jonathan CLARKE over 10 years ago

  • Subject changed from API using JSON parameters is ignored. to API calls using JSON content instead of parameters are ignored

Clarifying title.

Actions #7

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.7.0~rc1, which was released today.

Check out:
Actions

Also available in: Atom PDF