I tried setting the content length to -1, as per MSDN:
The ContentLength property contains the value of the Content-Length header
returned with the response. If the Content-Length header is not set in the
response, ContentLength is set to the value -1.
Restlet now complains that the content
Follow-up:
It *does* get through if I can arrange to not set the content length at all.
However, this requires some deviousness on the client side. I would personally
much prefer if Restlet ignored a content length of zero.
--
I have tried sending (PUT) with a content-type of text/plain (verified via
Fiddler). On the server side, I have tried:
@Put(text/plain)
@Put(text)
@Put(plain)
I still get the media error in all cases.
What am I doing wrong? Can I tell Restlet to accept *anything*?
@Put
should be enough to tell Restlet to accept anything
El jul 14, 2014 1:16 PM, Frank Kolnick reallyfr...@hotmail.com escribió:
I have tried sending (PUT) with a content-type of text/plain (verified
via Fiddler). On the server side, I have tried:
@Put(text/plain)
@Put(text)
@Put(plain)
Unfortunately, that does not appear to be the case. I.e., that's where I
started, and was getting the error. I tried the variations in order to fix the
problem, so far without success.
@Put
should be enough to tell Restlet to accept anything
El jul 14, 2014 1:16 PM, Frank Kolnick
Euh... I'm sorry but then the problem must be somewhere else.
I use @Put all the time, handling the different media types myself, and I
only got HTTP 415 when my own-written code explicitly threw
ResourceException(Status.CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE).
can you please try this on your
6 matches
Mail list logo