occi 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/occi/parser.rb +3 -3
- data/lib/occi/version.rb +1 -1
- metadata +1 -1
data/lib/occi/parser.rb
CHANGED
@@ -44,7 +44,7 @@ module OCCI
|
|
44
44
|
OCCI::Log.debug('### Parsing request data to OCCI data structure ###')
|
45
45
|
collection = OCCI::Collection.new
|
46
46
|
|
47
|
-
locations
|
47
|
+
locations = self.header_locations(header)
|
48
48
|
category ? collection = self.header_categories(header) : collection = self.header_entity(header) if locations.empty?
|
49
49
|
|
50
50
|
case media_type
|
@@ -52,8 +52,8 @@ module OCCI
|
|
52
52
|
when 'text/uri-list'
|
53
53
|
body.each_line { |line| locations << URI.parse(line) }
|
54
54
|
when 'text/plain', nil
|
55
|
-
locations
|
56
|
-
|
55
|
+
locations.concat self.text_locations(body)
|
56
|
+
category ? collection = self.text_categories(body) : collection = self.text_entity(body) if locations.empty? && collection.empty?
|
57
57
|
when 'application/occi+json', 'application/json'
|
58
58
|
collection = self.json(body)
|
59
59
|
when 'application/occi+xml', 'application/xml'
|
data/lib/occi/version.rb
CHANGED