Java error when trying to download a form

1. What is the problem? Be very detailed.
We have a custom aggregate running on a LAMP stack. It has worked for years without problem. Recently we cannot download a form. We see the list of all forms without problem, but when when one is chosen, I get
image
If I use my web browser to go to a URL found in the XML list of forms, it goes to the aggregate (ex: https://www.wepi.org/project/ODKXML/token/5d14d6337df0b), and gets the form perfectly. However, not with the application. I tried with ODK 1.17.2, 1.22.4, and 1.23.0 beta0.

My guess is that our server infrastructure has implimented some security measures and does not like an application fetching the forms but is happy if it is a browser. What can I ask or tell the people running the server and the firewalls and security to check or change so that the form request is handled and the form gets sent back to the ODK app?

4. What steps can we take to reproduce the problem?
You could point your ODK collect to the server https://www.wepi.org/odk and fetch one of the forms from your account (you know who you are ; ). You don't have to go through all that though. First, if you have suggestions for communicating with my infrastructure team on what they might check/allow.

Curtis Broderick

Hi @Curtis_Broderick

I would try to reproduce your problem and fix it but could you give me an access to do that (username/pass)? You can send it via private message or email.

@Curtis_Broderick
Thanks for credentials and sorry it took that long but as you know I was on sick leave.
I investigated the issue, initially assuming that there is something wrong in Collect (maybe after switching to OkHttp). However, now I'm pretty sure it's a problem on your (server) side.
Your server returns error code 500 Internal Server Error
I used an online tool to test http requests https://reqbin.com/ and:
GET with https://wepi.org/odk/formList and credentials you have shared with me returns a list of all available forms and it works in Collect as well as you have noticed.
GET with any downloadUrl from the received list eg. https://wepi.org/project/ODKXML/token/5885e55a67b34
returns 500 (Internal Server Error) (same like in Collect) and

<!DOCTYPE html>
<html>

<head>
    <title>Error</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="/css/site.css" type="text/css" />
</head>

<body>
    <div id="page">
        <header>
            <a href="/index/index/token/5885e55a67b34">
                <h1>WEPI</h1>
            </a>
            <h2>Web questionnaires<br />for epidemiologists and health professionals</h2>
            <div id="header_bt_vzn">
                <input type="button" id="link_vzn" name="link_vzn" value="Powered by" onClick="document.location.href='http://www2.voozanoo.net';" class="btVzn" />
            </div>
        </header>
        <div class="spacer"></div>

        <div id="page_content">
            <h3>An error has occurred</h3>
            Unfortunately an error in Wepi has occurred. It has been logged and sent to our software team. If you get this message frequently, please contact us at info@wepi.org to tell us more about the circumstances that make this occur. We are sorry for any inconvenience
            this has caused you. Try clearing the cache (Firefox: ctrl-shift-del > cache, Internet Explorer: Tools > Safety > Delete browsing history > Internet and temporary web files)in your web browser.

        </div>

        <div class="spacer"></div>
        <footer>
            <div id="footer_links">
                <a href="/index/about/token/5885e55a67b34">About WEPI</a> | <a href="/index/faq/token/5885e55a67b34">FAQ</a> | <a href="mailto:wepi@epiconcept.fr">Contact WEPI team</a> | <a href="/index/legal/token/5885e55a67b34">Legal info</a>
            </div>
            <div id="footer_copyright">&copy; <a href="http://www.epiconcept.fr">Epiconcept 1996-2013</a></div>
        </footer>
        <div class="spacer"></div>

    </div>

</body>

</html>

so to sum up, your server has some problems with GET requests. It works for form list (in Collect and using the tool I used) but it doesn't work if you want to download a particular form.

I'm not an expert in that area but maybe your server requires something more, some special header in GET request maybe if you want to download forms?

Please try to contact wepi info@wepi.org as described in the revived content.