sonata-nfv / son-catalogue-repos

SONATA's Service Platform Catalogue and Repository
http://www.sonata-nfv.eu
Apache License 2.0
4 stars 10 forks source link

Package meta-data being returned as text (?) #166

Closed jbonnet closed 7 years ago

jbonnet commented 7 years ago

Hey, When using curl I'm getting package meta-data in Content-Type: text/html;charset=utf-8... while I'm asking it in accept:application/json:

$ curl -v -H 'accept:application/json' -H 'content-type:application/json' sp.int3.sonata-nfv.eu:4002/catalogues/son-packages/f375eaff-65eb-46cb-8da9-53f627664799
*   Trying 143.233.127.27...
* TCP_NODELAY set
* Connected to sp.int3.sonata-nfv.eu (143.233.127.27) port 4002 (#0)
> GET /catalogues/son-packages/f375eaff-65eb-46cb-8da9-53f627664799 HTTP/1.1
> Host: sp.int3.sonata-nfv.eu:4002
> User-Agent: curl/7.51.0
> accept:application/json
> content-type:application/json
> 
< HTTP/1.1 200 OK
< Content-Type: text/html;charset=utf-8
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Content-Length: 7048
< 
PK?vJ??I?<<#service_descriptors/sonata-demo.ymlauthor: Felipe Vicens, Atos IT Solutions and Services Iberia
connection_points:
- id: ns:mgmt
  interface: ipv4
  type: management
- id: ns:input
  interface: ipv4
  type: external
- id: ns:output
  interface: ipv4
  type: external
description: "\"The network service descriptor for the SONATA demo,\n comprising a\
  \ Virtual Traffic Classifier\"\n"
...

Can you confirm that?

dang03 commented 7 years ago

Hi @jbonnet, Some responses were not returned correctly with the content-type set to application/json. Commit #167 fixes this. You should see them now correctly.

dang03 commented 7 years ago

This bug is fixed. However a bug is found in GK API, which causes losing the filename in the process. son-gkeeper issue #470 handles it.