Project

General

Profile

Actions

Bug #3770

closed

API calls using JSON content instead of parameters are ignored

Bug #3770: API calls using JSON content instead of parameters are ignored

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

Status:
Released
Priority:
1 (highest)
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.

Updated by Vincent MEMBRÉ over 12 years ago Actions #1

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

Updated by Vincent MEMBRÉ over 12 years ago Actions #2

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

Updated by Vincent MEMBRÉ over 12 years ago Actions #3

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

Updated by Vincent MEMBRÉ over 12 years ago Actions #4

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

Updated by Anonymous over 12 years ago Actions #5

Updated by Jonathan CLARKE over 12 years ago Actions #6

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

Clarifying title.

Updated by Jonathan CLARKE over 12 years ago Actions #7

  • 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: PDF Atom