Hi

I have problem after upgrade to 2.1.0. Functions called via rest http with 
request's body behaves differently than in 2.0.13.

Function test with no params and body 
return "|"+request.getContent()+"|" 
invoked from url http://localhost:2480/function/GratefulDeadConcerts/test 
with Content-Type text/plain or application/json returns
{
    "result": [
        {
            "@type": "d",
            "@version": 0,
            "value": "|1234|"
        }
    ]
} 
or 
{
    "result": [
        {
            "@type": "d",
            "@version": 0,
            "value": "|{\"a\":1}|"
        }
    ]
}
Request headers:

   1. Accept:
   */*
   2. Accept-Encoding:
   gzip, deflate
   3. Accept-Language:
   pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
   4. Cache-Control:
   no-cache
   5. Connection:
   keep-alive
   6. Content-Length:
   7
   7. Content-Type:
   application/json (or text/plain)
   8. Cookie:
   OSESSIONID=OS14388858675925459820098426764299
   9. CSP:
   active
   10. Host:
   localhost:2480
   11. Origin:
   chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef
   12. User-Agent:
   Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
   Ubuntu Chromium/43.0.2357.81 Chrome/43.0.2357.81 Safari/537.36
   
Replaying this scenario in 2.1.0 I'm getting 400 Bad Request for every non 
empty body, for empty is ok ( "value": "|null|" )

For example for body {"a":1} and application/json or text/plain response is 
{
    "errors": [
        {
            "code": 400,
            "reason": "Bad request",
            "content": "Error on parsing parameters from request body\nnull"
        }
    ]
}
for 1234 in body and both content types response is  
{
    "errors": [
        {
            "code": 400,
            "reason": "Bad request",
            "content": "Error on parsing parameters from request 
body\nError on unmarshalling JSON content '1234': content must be between { 
}"
        }
    ]
} 
Request headers are the same as for 2.0.13 experiment

   1. Accept:
   */*
   2. Accept-Encoding:
   gzip, deflate
   3. Accept-Language:
   pl-PL,pl;q=0.8,en-US;q=0.6,en;q=0.4
   4. Authorization:
   Basic cm9vdDpyb290
   5. Cache-Control:
   no-cache
   6. Connection:
   keep-alive
   7. Content-Length:
   4
   8. Content-Type:
   application/json (or text/plain)
   9. Cookie:
   OSESSIONID=OS1438888336749-6080508861240827694
   10. CSP:
   active
   11. Host:
   localhost:2480
   12. Origin:
   chrome-extension://mkhojklkhkdaghjjfdnphfphiaiohkef
   13. User-Agent:
   Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
   Ubuntu Chromium/43.0.2357.81 Chrome/43.0.2357.81 Safari/537.36
   
Best 
Kris

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to