freme-project / pipelines

Apache License 2.0
0 stars 0 forks source link

Test of pipeline 1 from the #45 with invalid pipeline failed #10

Closed m1ci closed 9 years ago

m1ci commented 9 years ago

e-Entity -> e-Link

curl -v -d @pipeline1.json -X POST -H "Content-Type: application/json" "http://localhost:8080/pipelining/chain"

pipeline1.json is the same e-Entity -> e-Link pipeline from the documentation with only changed the “headers” part to:

"hea": {
    "ctent-type": "texain",
    "acpt": "texurtle"
},

Results:

Example:

"header": {
    "ctent-type": "texain",
    "acpt": "texurtle"
},
ghsnd commented 9 years ago

The first issue should be adressed, I agree (will let you know if it's fixed). As for the second: pure technically, you can insert whatever you want as header into an HTTP request, as long as it obeys the format. It is a good question to see if it is up to the pipelining service to check that. Personally I think it is up to the service in question to check headers / content and reply with an error.

m1ci commented 9 years ago

The first issue should be adressed, I agree (will let you know if it's fixed).

OK

As for the second: pure technically, you can insert whatever you want as header into an HTTP request, as long as it obeys the format. It is a good question to see if it is up to the pipelining service to check that. Personally I think it is up to the service in question to check headers / content and reply with an error.

I agree.

ghsnd commented 9 years ago

Issue 1 should be fixed: in the case of the example, the response body is:

{
  "exception": "eu.freme.broker.exception.NotAcceptableException",
  "path": "/pipelining/chain",
  "message": "Error detected in the JSON body contents: Request 1: field \"hea\" not known.",
  "error": "Not Acceptable",
  "status": 406,
  "timestamp": 1440081037672
}

Can you re-test ?

m1ci commented 9 years ago

test passed, well done!