This project is read-only.


Handle Breeze client (and datajs?) relative URLs within odata/$batch requests


Relative URLs for sub-requests within an odata\$batch request are currently resolved in a way that seems intuitive, but is not consistent with what DefaultODataBatchHandler does, and it's resulting in 404 subresponses.

Eg for this example:


Content-Type: multipart/mixed; boundary=changeset_b5e1-6019-8b2f

Content-Type: application/http
Content-Transfer-Encoding: binary

POST odata/TodoItems HTTP/1.1
Content-ID: 1
DataServiceVersion: 2.0
Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
Content-Type: application/json
MaxDataServiceVersion: 3.0


HTTP/1.1 202 Accepted
Cache-Control: no-cache
Pragma: no-cache
Content-Type: multipart/mixed; boundary=batchresponse_7e404dc1-7370-4f23-a33f-95e50da07c96
Expires: -1
Server: Microsoft-IIS/8.0
DataServiceVersion: 3.0
X-AspNet-Version: 4.0.30319
X-SourceFiles: =?UTF-8?B?Qzpcc3JjXGdpdGh1YlxCcmVlemVcT0RhdGFTYW1wbGUrRW50aXR5UmVwb3NpdG9yeVxPRGF0YUJyZWV6ZWpzU2FtcGxlXG9kYXRhXCRiYXRjaA==?=
X-Powered-By: ASP.NET
Date: Thu, 25 Dec 2014 21:33:14 GMT
Content-Length: 681

Content-Type: multipart/mixed; boundary=changesetresponse_7915c1a7-3901-445f-b8bc-12cc49605dec

Content-Type: application/http
Content-Transfer-Encoding: binary

HTTP/1.1 404 Not Found
Content-ID: 1
Content-Type: application/json; charset=utf-8

{"Message":"No HTTP resource was found that matches the request URI 'http://localhost:55802/odata/odata/TodoItems'.","MessageDetail":"No type was found that matches the controller named 'odata'."}
Closed Dec 27, 2014 at 7:41 AM by johncrim
Resolving this - the current behavior is correct (correct resolution of relative URIs within a $batch request), per the odata 3 and odata 4 spec. The fix can be made on the Breeze client, as specified in the linked issue.


johncrim wrote Dec 25, 2014 at 10:25 PM

This issue is documented in other places:

So it's not immediately clear whether fixing this is correct or not.

johncrim wrote Dec 25, 2014 at 10:45 PM