Proper use of HTTP status codes in a “validation” server

前端 未结 7 1641

Among the data my application sends to a third-party SOA server are complex XMLs. The server owner does provide the XML schemas (.xsd) and, since the server rej

7条回答
  •  自闭症患者
    2020-12-13 10:37

    From w3c: 400 = The request could not be understood by the server due to malformed syntax.

    I wouldn't serve that up unless it was actually the case that the server could not understand the request. If you're just getting invalid xml, serve a 200 and explain why things are not working.

    Regards Fake

提交回复
热议问题