Hi,
I'm trying to write a very simple server script in php to handle
submissions from ODK Collect. I already got it to work with Collect
1.1.5 but it doesn't work with 1.1.7 because of the changes in the protocol.
I've had a hard time trying to find some documentation about how the
client behaves and how it expects the server to behave. The only
documentation seems to be the source code itself.
So I had a look at the source code of ODK Collect and I seem to
understand that when ODK Collect does a HTTP HEAD request to /submission
with the correct login credentials, it expects a "204 No Content"
response AND a Location header. If there is no Location header, it will
give a "FAILED: network login?" error which is exactly what I am
experiencing.
So my question is: isn't 204 + Location a violation of HTTP protocol
specification? I thought that the Location header could only be used in
conjunction with 3xx responses OR with "201 created".
This may be why I am not being able to return such a header with such a
response in PHP. PHP seems to force a 302 response when I issue a
Location header (but it does allow me to issue a Location header with a
204 response).
Or am I missing something?
thanks
m.