Bug 822722 - Broker doesn't allow valid JSON value of true to be passed
Summary: Broker doesn't allow valid JSON value of true to be passed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-17 22:36 UTC by Clayton Coleman
Modified: 2015-05-15 00:51 UTC (History)
3 users (show)

Fixed In Version: devenv_1809
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:59:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clayton Coleman 2012-05-17 22:36:55 UTC
Started POST "/broker/rest/domains/1337293882aab02d/applications.json" for 127.0.0.1 at Thu May 17 18:31:27 -0400 2012
  Processing by ApplicationsController#create as JSON
  Parameters: {"domain_id"=>"1337293882aab02d", "cartridge"=>"ruby-1.8", "name"=>"cart1337293882aab02d_s", "scale"=>true}
Adding user app_test11337293882aab02d...inside base_controller
MongoDataStore.find(CloudUser, app_test11337293882aab02d, app_test11337293882aab02d)

Completed 500 Internal Server Error in 56ms

NoMethodError (undefined method `upcase' for true:TrueClass):

true is a legal literal in JSON.  Affecting our ability to post from a Rails model, needs to be fixed this sprint.

Comment 1 Clayton Coleman 2012-05-17 22:38:29 UTC
http://json.org/

Comment 2 Abhishek Gupta 2012-05-30 21:02:37 UTC
https://github.com/openshift/crankcase/pull/89

Comment 3 Xiaoli Tian 2012-06-01 07:56:21 UTC
Verified it on devenv-stage_198 with -d scale=TRUE, -d scale="true" and -d scale=true

1. curl -k -H "Accept: application/json" --user "xtian+t105:1"  https://ec2-107-22-64-249.compute-1.amazonaws.com/broker/rest/domains/domaindev03/applications -d name=scaleperl2  -d cartridge=perl-5.10 -d scale=TRUE -X POST

2. curl -k -H "Accept: application/json" --user "xtian+t105:1"  https://ec2-107-22-64-249.compute-1.amazonaws.com/broker/rest/domains/domaindev03/applications -d name=scaleruby2  -d cartridge=ruby-1.8 -d scale="true" -X POST

All work.


Started POST "/broker/rest/domains/domaindev03/applications" for 203.114.244.88 at Fri Jun 01 03:33:11 -0400 2012
  Processing by ApplicationsController#create as JSON
  Parameters: {"scale"=>"TRUE", "cartridge"=>"perl-5.10", "name"=>"scaleperl2", "domain_id"=>"domaindev03"}
MongoDataStore.find(CloudUser, xtian+t105, xtian+t105)


Note You need to log in before you can comment on or make changes to this bug.