Hi,

It's not really Yaws specific, but I think a better behaviour would be to not to change the content type in the 200 OK.

( In general the 200 OK is a "confirmation" like message, therefore in general it should not change any parameter from the query, unless it's necessary. )

Even if I would be mistaken, in case the incoming query indicates "text/xml", the chances it can process our answer with that content type is higher, than the chance it can process the answer with a different content type.

Therefore I think it would be better to send 200 OK with the content type matching the query it answers.
Unless it's explicitly required otherwise by some standard, in which case YAWS should decide how strict it's standards implementations should be.


András Mocsáry
Software Developer


2012/6/3 Amit Weisman <amitweisman@rcn.com>
Thanks .
I will ping if its not working.

Amit



> Date: Thu, 31 May 2012 22:45:28 -0400
> Subject: Re: [Erlyaws-list] SOAP content type changed
> From: vinoski@ieee.org
> To: amitweisman@rcn.com
> CC: erlyaws-list@lists.sourceforge.net
>
> Thanks. I reverted the MIME type change, so grab the latest from
> github and hopefully all will work for you.
>
> --steve
>
> On Wed, May 30, 2012 at 10:56 PM, Amit Weisman <amitweisman@rcn.com> wrote:
> > From Fiddler , this is the raw request from the C# client (I removed the url of my server , I can send it to you , Steve, if you want to hit it or check the wsdl) :
> >
> > POST /CaptionContest.yaws HTTP/1.1
> > Content-Type: text/xml; charset=utf-8
> > VsDebuggerCausalityData: uIDPo6lFHSTP0e5IrDOSabhGLB8AAAAARmQIJc8fMEGWZi8QBYonE10f21zb2CVBt8g1cGVVSpQACQAA
> > SOAPAction: "http://url.to.server:8009/Add"
> > Host: url.to.server:8009
> > Content-Length: 262
> > Expect: 100-continue
> > Connection: Keep-Alive
> >
> > <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Add xmlns="http://url.to.server:8009"><x>23</x><y>2</y></Add></s:Body></s:Envelope>
> >
> >
> > Here is the reply from Yaws (again, raw from Fiddler):
> >
> > HTTP/1.1 200 OK
> > Server: Yaws 1.92
> > Date: Thu, 31 May 2012 02:45:53 GMT
> > Allow: GET, POST, OPTIONS, HEAD
> > Content-Length: 193
> > Content-Type: application/xml
> >
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><p:AddReturn xmlns:p="http://url.to.server:8009"><p:r>25</p:r></p:AddReturn></soap:Body></soap:Envelope>
> >
> >
> > Thanks
> > Amit

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list