Hi Jason, On Tue, Nov 6, 2012 at 2:22 PM, Junchang(Jason) Wang <[email protected] > wrote:
> > I wonder whether it's reasonable that servers return error code > (say E_SYNTAX) PLUS some clues (say, a piece of the string that incurs the > problem). I think that benefits clients a lot. > > Adding a string then opens the issue of multi-language support, which can become a problem. Regarding the specific test case, I would imagine that a more specific error is an error code indicating that the client has required a URL that is not exposed by the Information Directory (due to a typo in the current case). In the current spec, this is shown as a general ALTO code E_SYNTAX and HTTP status code 400 (Bad Request). I can imagine that the HTTP error code could be 404 (Not Found) in this case to be more informative, instead of the current 400. Richard > > Thanks. > > --Jason > > > On Mon, Nov 5, 2012 at 11:54 PM, Y. Richard Yang <[email protected]> wrote: > >> Hi Vijay, >> >> On Mon, Nov 5, 2012 at 9:35 PM, Vijay Gurbani <[email protected]>wrote: >> >>> Here is the request: >>> POST /endpoints/costs HTTP/1.1 >>> >> >> costs -> cost according to spec? >> >> Richard >> >> >>> Accept: application/alto-endpointcost+json,application/alto-error+json >>> Content-Type: application/alto-endpointcostparams+json >>> Content-Length: 488 >>> >>> { >>> "constraints": ["le 5", "ge 4"], >>> "cost-mode": "numerical", >>> "cost-type": "routingcost", >>> "endpoints": { >>> "dsts": [ >>> "ipv4:10.0.0.0", >>> "ipv4:15.0.0.0", >>> "ipv4:192.168.11.0", >>> "ipv4:192.168.10.0", >>> "ipv4:128.0.0.0", >>> "ipv4:130.0.0.0", >>> "ipv4:0.0.0.0", >>> "ipv4:132.0.0.0", >>> "ipv4:135.0.0.0" >>> ], >>> "srcs": [ >>> "ipv4:10.0.0.0", >>> "ipv4:192.168.11.0", >>> "ipv4:192.168.10.0" >>> ] >>> } >>> } >>> >>> and response: >>> cat Test-ECS-3.txt | nc p4p-1.cs.yale.edu 6671 >>> HTTP/1.1 400 Bad Request >>> Content-Length: 24 >>> Content-Type: application/alto-error+json >>> Date: Tue, 06 Nov 2012 02:47:18 GMT >>> >>> { >>> "code" : "E_SYNTAX" >>> } >>> >> >> >
_______________________________________________ alto mailing list [email protected] https://www.ietf.org/mailman/listinfo/alto
